format is inspired by `Gentoo <http://www.gentoo.org/>`_'s ebuilds.
A fork of PIP_ is included to make installation of python packages
easier, and as an example of use of the BPT API.
Enjoy,
Giuseppe Ottaviano
--
http://mail.python.org/mailman/listinfo/python-list
Talking of stow, I take advantage of this thread to do some shameless
advertising :)
Recently I uploaded to PyPI a software of mine, BPT [1], which does
the same symlinking trick of stow, but it is written in Python (and
with a simple api) and, more importantly, it allows with another trick
ld>`_, but without the dependency
resolution and automatic downloading machinery, and the ``bpt-rules``
format is inspired by `Gentoo <http://www.gentoo.org/>`_'s ebuilds.
Enjoy,
Giuseppe Ottaviano
--
http://mail.python.org/mailman/listinfo/python-list
Gentoo <http://www.gentoo.org/>`_'s ebuilds.
--
Giuseppe Ottaviano
--
http://mail.python.org/mailman/listinfo/python-list
In Python, I retrive an Entity from the EntityList:
elist = EntityList()
elist.append(Entity())
elist.append(Entity())
entity = elist.get_at(0)
entity.foo()
But it crashes inside foo() as the private static data is empty; or
rather the string array is empty. I know before that point that the
class D:pass
d = D()
exec source_code in d.__dict__
print d.some_name
Notice that this will also give you d.__builtins__, which you might
want to del afterwards.
If you want to mimic an import you can also do this:
import types
D = types.ModuleType('D')
exec source_code in D.__dict__
print D.
[snip]
Provided you don't change the order of the items in the tuple, you can
just use slicing:
a, b = f()[ : 2]
Yes, this is what you would normally do with tuples. But i find this
syntax very implicit and awkward. Also, you cannot skip elements, so
you often end up with things like
a,
I found the namedtuple very convenient for rapid prototyping code, for
functions that have to return a number of results that could grow as
the code evolves. They are more elegant than dicts, and I don't have
to create a new explicit class. Unfortunately in this situation they
lose the conv
Hmm, difficult to react to this. On the one hand I have had people
argue that block delimiting in python is explicit too. So in that
case python doesn't differ from those other languages.
On the other hand if we accept that blocks are delimited implicitely
in python then it seems python doesn't
On Jun 1, 2008, at 6:16 PM, George Sakkis wrote:
Equivalence is a class that can be used to maintain a partition of
objects into equivalence sets, making sure that the equivalence
properties (reflexivity, symmetry, transitivity) are preserved. Two
objects x and y are considered equivalent eithe
Interesting.. it took me a while to figure out why the second case is
so much slower and you're right, it is indeed quadratic. I don't know
how likely would such pathological cases be in practice, given that
the preferred way to merge a batch of objects is
eq.merge(*xrange(10001)), which is more
On May 13, 2008, at 12:28 PM, [EMAIL PROTECTED] wrote:
Hi - I have a list returned from popen/readlines, and am wondering how
to go about iterating over each item which was returned (rather than
currently having the whole lot returned).
so far:
f=os.open("./get_hostnames").readlines
return
12 matches
Mail list logo