Re: [Python-3000] python -S

2008-08-14 Thread Antoine Pitrou
Le vendredi 15 août 2008 à 00:13 +0200, "Martin v. Löwis" a écrit : > > Any thoughts? > > That is http://bugs.python.org/issue586680, right? > > As a work-around, test_cmd_line should set PYTHONPATH to include > the build directory (i.e. what addbuilddir has added). Thanks a lot for the suggesti

Re: [Python-3000] python -S

2008-08-14 Thread Brett Cannon
On Thu, Aug 14, 2008 at 5:32 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Antoine Pitrou wrote: >> >> I feel stupid for not thinking of such an obvious solution. >> (by the way, is _thread always available?) > > _thread is a builtin module. It's available on every platform that supports > thre

Re: [Python-3000] python -S

2008-08-14 Thread Christian Heimes
Antoine Pitrou wrote: I feel stupid for not thinking of such an obvious solution. (by the way, is _thread always available?) _thread is a builtin module. It's available on every platform that supports threading (which should be all platforms we support). If you want to be extra carefully then

Re: [Python-3000] python -S

2008-08-14 Thread Antoine Pitrou
Christian Heimes cheimes.de> writes: > > Couldn't you use "from _thread import allocate_lock as Lock" instead? I feel stupid for not thinking of such an obvious solution. (by the way, is _thread always available?) ___ Python-3000 mailing list Python-

Re: [Python-3000] python -S

2008-08-14 Thread Christian Heimes
Antoine Pitrou wrote: Well, it looks like I underestimated the consequences of making io.py depend on the threading module. Is it ok if I add itertools, operator, _collections and time to the list of statically compiled modules? They are needed by threading, and thus necessary for running setup.p

Re: [Python-3000] python -S

2008-08-14 Thread Antoine Pitrou
Well, it looks like I underestimated the consequences of making io.py depend on the threading module. Is it ok if I add itertools, operator, _collections and time to the list of statically compiled modules? They are needed by threading, and thus necessary for running setup.py on a blank checkout.

Re: [Python-3000] python -S

2008-08-14 Thread Martin v. Löwis
> Any thoughts? That is http://bugs.python.org/issue586680, right? As a work-around, test_cmd_line should set PYTHONPATH to include the build directory (i.e. what addbuilddir has added). Regards, Martin ___ Python-3000 mailing list Python-3000@python.o

Re: [Python-3000] Bytes and unicode conversion in C extensions

2008-08-14 Thread Christian Heimes
Jesus Cea wrote: Current pybsddb code don't allow subclassing or adding new attibutes to a given instance. I will (probably) work on this for a future pybsddb version. Pointers to references to do this kind of magic welcomed :-) For making it subclass-able you have to add Py_TPFLAGS_BASETYPE to

[Python-3000] python -S

2008-08-14 Thread Antoine Pitrou
Hello, I have a problem with "python -S". When python is launched from its build dir, the extension build dir is not added to sys.path, and thus importing some modules fails: $ ./python -S -c "import threading" Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/p

Re: [Python-3000] Bytes and unicode conversion in C extensions

2008-08-14 Thread M.-A. Lemburg
On 2008-08-14 07:10, Jesus Cea wrote: M.-A. Lemburg wrote: | BTW: If you make the database object subclassable, an application | could easily implement whatever strategy is needed on top of the | bytes-only interface. Current pybsddb code don't allow subclassing or adding new attibutes to a give

Re: [Python-3000] translation support feature, via extended % operators

2008-08-14 Thread Stephen J. Turnbull
"Martin v. Löwis" writes: > > With some languages > > requiring restructuring of the phraseology, what seems to be the first > > fragment and the second fragment may no longer be ordered in the same > > manner in a target language. > > That is theoretical, right? For a specific message, and

Re: [Python-3000] translation support feature, via extended % operators

2008-08-14 Thread Martin v. Löwis
> With some languages > requiring restructuring of the phraseology, what seems to be the first > fragment and the second fragment may no longer be ordered in the same > manner in a target language. That is theoretical, right? For a specific message, and a specific set of languages, I'm fairly opti

Re: [Python-3000] translation support feature, via extended % operators

2008-08-14 Thread Martin v. Löwis
> In this message I'll discuss a scheme for handling complex > translations with multiple numeric parameters. Please take a look at the plural support in gettext. I think it should allow you to achieve the proper string substitution already today. Regards, Martin _