Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread Stefan Behnel
"Martin v. Löwis", 13.11.2011 21:46: I'm asking specifically because I'd like to properly implement __file__ in Cython modules at module init time. Why do you need to implement __file__? Python will set it eventually to its correct value, no? Well, yes, eventually. However, almost all real wo

Re: [Python-Dev] peps: And now for something completely different.

2011-11-14 Thread Victor Stinner
If the PEP 404 lists important changes between Python 2 and Python 3, the removal of old-style classes should also be mentioned because it is a change in the core language. Victor ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

[Python-Dev] Delivery reports about your e-mail

2011-11-14 Thread gh
The original message was received at Mon, 14 Nov 2011 12:56:42 +0200 from ghaering.de [173.1.122.19] - The following addresses had permanent fatal errors - - Transcript of session follows - while talking to python.org.: >>> MAIL From:g...@ghaering.de <<< 501 g...@ghaering.de...

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread Nick Coghlan
On Mon, Nov 14, 2011 at 6:18 PM, Stefan Behnel wrote: >> Certainly. An approach similar to _Py_PackageContext should be possible. > > Yes, and a "_Py_ModuleImportContext" would be rather trivial to do. Could > that go into 3.3? What about 2.7? Could an exception be made there regarding > new "feat

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread mark florisson
On 14 November 2011 08:18, Stefan Behnel wrote: > "Martin v. Löwis", 13.11.2011 21:46: >>> >>> I'm asking specifically because I'd like to properly implement __file__ >>> in Cython modules at module init time. >> >> Why do you need to implement __file__? Python will set it eventually to >> its cor

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread Stefan Behnel
mark florisson, 14.11.2011 12:55: On 14 November 2011 08:18, Stefan Behnel wrote: "Martin v. Löwis", 13.11.2011 21:46: I'm asking specifically because I'd like to properly implement __file__ in Cython modules at module init time. Why do you need to implement __file__? Python will set it even

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Fix memory leak with FLUFL-related syntax errors (!)

2011-11-14 Thread Éric Araujo
> changeset: 0feb5a5dbaeb > user:Antoine Pitrou > date:Sun Nov 13 01:02:02 2011 +0100 > summary: > Fix memory leak with FLUFL-related syntax errors (!) I don’t think it is allowed to criticize FLUFL-related code. As the FLUFL is flawless, so are flufly things. I hear the PSU

[Python-Dev] urllib.request.urlopen struggling in Windows 7

2011-11-14 Thread Thom Ives
Previously, in python 2.6, I had made a lot of use of urllib.urlopen to capture web page content and then post process the data from the site I was downloading. Now, those routines, and the new routines I am trying to use for python 3.2 are running into what seems to be a windows only (maybe even w

Re: [Python-Dev] urllib.request.urlopen struggling in Windows 7

2011-11-14 Thread Martin v. Löwis
> I do believe this is a windows issue, but can python be made more robust to > deal > with what is causing it? I can't believe that it's a Windows issue, and neither can I believe that it's a Python issue (although this is more likely). Most likely, it's a server issue, i.e. the server somehow

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread Martin v. Löwis
>> Currently, for Cython? I don't think that can work. > > Hmm, it might work to put an empty module next to the 'real' extension > and to import it to figure out the common directory of both. As long as > it's still there after installation and the right one gets imported, > that is. A relative i