[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-02 Thread Giuseppe Ottaviano
New submission from Giuseppe Ottaviano giu...@gmail.com: With a fresh install from python-2.7rc2.amd64.msi (rc1 is also affected) multiprocessing gives the following error: Python 2.7rc2 (r27rc2:82154, Jun 22 2010, 21:22:29) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits

[ANN] BPT (Boxed Package Tool) 0.4a -- now with PIP support

2009-05-15 Thread Giuseppe Ottaviano
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

Re: [Python-Dev] how GNU stow is complementary rather than alternative to distutils

2009-05-11 Thread Giuseppe Ottaviano
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

[ANN] BPT (Boxed Package Tool) 0.3

2009-05-06 Thread Giuseppe Ottaviano
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

[ANN] BPT (Boxed Package Tool)

2009-04-30 Thread Giuseppe Ottaviano
://www.gentoo.org/`_'s ebuilds. -- Giuseppe Ottaviano -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

[ANN] BPT (Boxed Package Tool)

2009-04-29 Thread Giuseppe Ottaviano
://www.gentoo.org/`_'s ebuilds. -- Giuseppe Ottaviano -- http://mail.python.org/mailman/listinfo/python-list

[issue4367] Patch for segmentation fault in ast_for_atom

2008-11-20 Thread Giuseppe Ottaviano
New submission from Giuseppe Ottaviano [EMAIL PROTECTED]: Hi all, trying to compile Python 2.6 I got a segmentation fault while byte-compiling the modules. The segmentation fault happened in ast_for_atom, parsing an Unicode entity. I found out that another problem prevented unicodedata

[issue4369] Error building to a nonstandard prefix (with patch)

2008-11-20 Thread Giuseppe Ottaviano
New submission from Giuseppe Ottaviano [EMAIL PROTECTED]: Hi all, I am trying to compile python 2.6 using a user directory as prefix. In the the byte-compiling step of install, compileall.py fails to load all the .so modules (it fails for zlib.so and raises an exception for unicodedata.so), so

[issue4367] Patch for segmentation fault in ast_for_atom

2008-11-20 Thread Giuseppe Ottaviano
Giuseppe Ottaviano [EMAIL PROTECTED] added the comment: @amaury: Yes, this is exactly what I noticed. I didn't know how to create an instance of a PyUnicodeErrorObject. BTW, isn't PyErr_SetString used throughout the code? Should all those calls replaced with PyErr_SetObject? @benjamin

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-05 Thread Giuseppe Ottaviano
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

Re: Bind compiled code to name?

2008-06-22 Thread Giuseppe Ottaviano
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

Named tuples and projection

2008-06-20 Thread Giuseppe Ottaviano
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

Re: Named tuples and projection

2008-06-20 Thread Giuseppe Ottaviano
[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,

Re: Why does python not have a mechanism for data hiding?

2008-06-03 Thread Giuseppe Ottaviano
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

Re: ANN: equivalence 0.1

2008-06-02 Thread Giuseppe Ottaviano
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

Re: ANN: equivalence 0.1

2008-06-02 Thread Giuseppe Ottaviano
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

Re: Best way to delimit a list?

2008-05-13 Thread Giuseppe Ottaviano
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 returns