Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Terry Reedy
Lisandro Dalcin wrote: On Thu, Jul 23, 2009 at 5:42 PM, Terry Reedy wrote: Lisandro Dalcin wrote: On Thu, Jul 23, 2009 at 9:57 AM, Jean-Paul Calderone wrote: True, CPython has C infrastructure. What about the other Python runtimes, though? Perhaps these other Python runtimes could implemen

[Python-Dev] command line attachable debugger

2009-07-23 Thread Edward Peschko
all, I'I was wondering if there was a command line python debugger that was able to attach to an existing process. I'd very much like to be able to debug over a ssh session using screen. Ed (ps - and yes, I know about winpdb, etc... that is not exactly what I'm looking for..) ___

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Brett Cannon
On Thu, Jul 23, 2009 at 20:18, Guido van Rossum wrote: > So, I guess, we'll live with it for a while longer. Given that it > managed to evade our attention for so long, I think that's fine. > Can someone double-check me that the semantics can even be triggered in 3.1? I just tried and couldn't c

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Guido van Rossum
So, I guess, we'll live with it for a while longer. Given that it managed to evade our attention for so long, I think that's fine. I agree that there's no reason for a None result from loaders to be interpreted the same way, assuming that's not how it works ATM. And we can live with import and im

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Lisandro Dalcin
On Thu, Jul 23, 2009 at 5:42 PM, Terry Reedy wrote: > Lisandro Dalcin wrote: >> >> On Thu, Jul 23, 2009 at 9:57 AM, Jean-Paul Calderone >> wrote: >> >>> True, CPython has C infrastructure.  What about the other Python >>> runtimes, >>> though? >>> >> >> Perhaps these other Python runtimes could imp

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Brett Cannon
On Thu, Jul 23, 2009 at 19:48, Benjamin Peterson wrote: > 2009/7/23 Brett Cannon : > > > > > > On Thu, Jul 23, 2009 at 19:38, Benjamin Peterson > > wrote: > >> > >> 2009/7/23 Brett Cannon : > >> > None in Python 3.1 is really useless in terms of its semantics in > >> > relative > >> > imports; im

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Benjamin Peterson
2009/7/23 Brett Cannon : > > > On Thu, Jul 23, 2009 at 19:38, Benjamin Peterson > wrote: >> >> 2009/7/23 Brett Cannon : >> > None in Python 3.1 is really useless in terms of its semantics in >> > relative >> > imports; importlib doesn't support it and still passes as __import__ (at >> > least last

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Brett Cannon
On Thu, Jul 23, 2009 at 19:38, Benjamin Peterson wrote: > 2009/7/23 Brett Cannon : > > None in Python 3.1 is really useless in terms of its semantics in > relative > > imports; importlib doesn't support it and still passes as __import__ (at > > least last time I ran the test suite that way). I tho

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Benjamin Peterson
2009/7/23 Brett Cannon : > None in Python 3.1 is really useless in terms of its semantics in relative > imports; importlib doesn't support it and still passes as __import__ (at > least last time I ran the test suite that way). I thought we had agreed a > while back that supporting None was not warr

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Brett Cannon
On Thu, Jul 23, 2009 at 13:05, Guido van Rossum wrote: > On Thu, Jul 23, 2009 at 12:09 PM, Fred Drake wrote: > > On Jul 23, 2009, at 2:59 PM, Georg Brandl wrote: > >> > >> is the presence of None values in sys.modules considered an > implementation > >> detail? If not, it should be documented wh

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread David Lyon
On Fri, 24 Jul 2009 03:23:57 +0200, Christian Heimes wrote: > I'm sorry to inform you that a wxWindows based solution has zero change > to get into the Python standard library ever. We are not going to add > another GUI toolkit to the core distribution. In executable form, the Package Manager do

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Christian Heimes
david.l...@preisshare.net wrote: >> That's a document describing how to use âdistutilsâ, which is what >> every >> recipient of Python will already have installed. >> >>> Can I ask that you also provide a link for windows users >>> to my project: >>> >>> http://sourceforge.net/projects/python

[Python-Dev] REVIEW: PyArg_ParseTuple with "s" format and NUL: Bogus TypeError detail string.

2009-07-23 Thread Sean Reifschneider
Please review this, I'm worried that there are cases where convertitem() is returning a string that really should be overridden by the argument "help string". However, I'm worried that this change will get rid of useful messages (via the format "; help string"), when there otherwise wouldn't be.

Re: [Python-Dev] pthreads, fork, import, and execvp

2009-07-23 Thread Thomas Wouters
So attached (and at http://codereview.appspot.com/96125/show ) is a preliminary fix, correcting the problem with os.fork(), os.forkpty() and os.fork1(). This doesn't expose a general API for C code to use, for two reasons: it's not easy, and I need this fix more than I need the API change :-) (I ac

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread David Lyon
On Thu, 23 Jul 2009 18:30:58 +1000, Ben Finney wrote: > In which case you should work to get it accepted into standard Python > *before* asking for it to be promoted in the standard Python > documentation. I'm very interested in how I would go about doing that. Die-hard users probably know all

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Antoine Pitrou
Christian Tismer stackless.com> writes: > > Well, I doubt that a 12 byte long double causes any other > alignment but 4. In 32-bit mode, no. But under x86-64 Linux, a long double is 16 bytes (!!). Regards Antoine. ___ Python-Dev mailing list Python

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Christian Tismer
On 7/23/09 2:27 PM, Antoine Pitrou wrote: Christian Tismer stackless.com> writes: ... I'm not sure a double aligned on a 4-byte boundary is "misaligned" on a x86 CPU. I'm also not sure. Anyway, the result was neither intended nor expected, I guess. Alignment is primarily important to avo

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Antoine Pitrou
Antoine Pitrou pitrou.net> writes: > > In any case, you seem to be right on this particular point: the PyGC_Head > union > should probably contain a "double" alternative in addition to the "long > double" > (and perhaps even a "long long" one). Sorry, I realize that this doesn't really address

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Antoine Pitrou
Christian Tismer stackless.com> writes: > > The point is: The GC header is a structure invisible to the "real" > gc allocated objects. It is opaquely prepended to every gc aware > object. Therefore, it *needs* to have the correct size, in order > to propagate its (already correct) alignment to th

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Christian Tismer
On 7/23/09 2:04 AM, Antoine Pitrou wrote: Christian Tismer stackless.com> writes: Despite the fact that Python probably has to be changed: If it is true then all the 32-bit Linux Pythons have a 12 byte GC head, IOW they are *all* badly aligned. Why are they badly aligned? The fact that long

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Terry Reedy
Lisandro Dalcin wrote: On Thu, Jul 23, 2009 at 9:57 AM, Jean-Paul Calderone wrote: True, CPython has C infrastructure. What about the other Python runtimes, though? Perhaps these other Python runtimes could implement the functionality of PC/_subprocess.c and use ctypes for that ? Is it se

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Guido van Rossum
On Thu, Jul 23, 2009 at 12:09 PM, Fred Drake wrote: > On Jul 23, 2009, at 2:59 PM, Georg Brandl wrote: >> >> is the presence of None values in sys.modules considered an implementation >> detail?  If not, it should be documented what the None values mean to the >> interpreter. > > As I recall, they'

Re: [Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Fred Drake
On Jul 23, 2009, at 2:59 PM, Georg Brandl wrote: is the presence of None values in sys.modules considered an implementation detail? If not, it should be documented what the None values mean to the interpreter. As I recall, they're an optimization. But since sys.modules is itself docume

[Python-Dev] Document None values in sys.modules?

2009-07-23 Thread Georg Brandl
Hi all, is the presence of None values in sys.modules considered an implementation detail? If not, it should be documented what the None values mean to the interpreter. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou s

Re: [Python-Dev] python sendmsg()/recvmsg() implementation

2009-07-23 Thread Aahz
On Thu, Jul 23, 2009, K?lm?n Gergely wrote: > > This is the rewritten-from-scratch implementation of the > sendmsg()/recvmsg() methods. Any comments / suggestions / flames are > very welcome. Currently it supports what I need and I'm only releasing > it, because I don't have much time to develop i

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Lisandro Dalcin
On Thu, Jul 23, 2009 at 9:57 AM, Jean-Paul Calderone wrote: > > True, CPython has C infrastructure.  What about the other Python runtimes, > though? > Perhaps these other Python runtimes could implement the functionality of PC/_subprocess.c and use ctypes for that ? -- Lisandro Dalcín ---

Re: [Python-Dev] python sendmsg()/recvmsg() implementation

2009-07-23 Thread Kálmán Gergely
Hello This is the rewritten-from-scratch implementation of the sendmsg()/recvmsg() methods. Any comments / suggestions / flames are very welcome. Currently it supports what I need and I'm only releasing it, because I don't have much time to develop it further in the forseeable future (1-2 mont

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Thomas Heller
Jean-Paul Calderone schrieb: > On Thu, 23 Jul 2009 14:21:38 +0200, Christian Heimes wrote: >>Michael Foord wrote: >>> A big advantage of using ctypes is that it works cross-implementation - >>> on IronPython and PyPy already and on Jython soon. I'd like to see more >>> standard library modules use

Re: [Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

2009-07-23 Thread Stephen J. Turnbull
Floris Bruynooghe writes: > [dist-packages] is a pretty neat solution to the problem. To what problem? I admit I am no expert on Python packaging, but my experience with XEmacs suggests that this is the distro trying to help with a *set* of problems that the user/sysadmins really should be hand

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Amaury Forgeot d'Arc
2009/7/23 David Cournapeau : > On Thu, Jul 23, 2009 at 6:49 PM, Paul Moore wrote: >> 2009/7/22 Christian Tismer : >>> Maybe the simple solution is to prevent building extensions >>> with mingw, if the python executable was not also built with it? >>> Then, all would be fine I guess. >> >> I have ne

Re: [Python-Dev] Support for Python/Windows

2009-07-23 Thread Olemis Lang
On Wed, Jul 22, 2009 at 2:43 PM, "Martin v. Löwis" wrote: >> My question is the following : >> >> - What are the implications for Py users ? > > So I stick with what you said is your question: What are the > implications for Py users ? > > To this, the answer is mostly: none at all. There may be va

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Jesse Noller
On Thu, Jul 23, 2009 at 8:57 AM, Jean-Paul Calderone wrote: > On Thu, 23 Jul 2009 14:23:56 +0200, Christian Heimes > wrote: >> >> Nick Coghlan wrote: >>> >>> I see ctypes as largely useful when you want to call a native DLL but >>> don't have any existing infrastructure for accessing native code f

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Jesse Noller
On Thu, Jul 23, 2009 at 5:43 AM, wrote: > >> Raising it without at least glancing at the list archives which hold >> copious amounts of virtual text on that topic is somewhat inappropriate >> though :) > > Well I have consulted every available expert on the distutils list to the > point where I fe

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Jean-Paul Calderone
On Thu, 23 Jul 2009 14:23:56 +0200, Christian Heimes wrote: Nick Coghlan wrote: I see ctypes as largely useful when you want to call a native DLL but don't have any existing infrastructure for accessing native code from your project. A few lines of ctypes code is then a much better solution tha

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Jean-Paul Calderone
On Thu, 23 Jul 2009 14:21:38 +0200, Christian Heimes wrote: Michael Foord wrote: A big advantage of using ctypes is that it works cross-implementation - on IronPython and PyPy already and on Jython soon. I'd like to see more standard library modules use it. Distributions that choose not to incl

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Nick Coghlan
david.l...@preisshare.net wrote: >> Raising it without at least glancing at the list archives which hold >> copious amounts of virtual text on that topic is somewhat inappropriate >> though :) > > Well I have consulted every available expert on the distutils list to the > point where I feel 'up' w

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Christian Heimes
Nick Coghlan wrote: > I see ctypes as largely useful when you want to call a native DLL but > don't have any existing infrastructure for accessing native code from > your project. A few lines of ctypes code is then a much better solution > than adding a C or C++ compilation dependency just to acces

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread David Cournapeau
On Thu, Jul 23, 2009 at 6:49 PM, Paul Moore wrote: > 2009/7/22 Christian Tismer : >> Maybe the simple solution is to prevent building extensions >> with mingw, if the python executable was not also built with it? >> Then, all would be fine I guess. > > I have never had problems in practice with ext

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Christian Heimes
Michael Foord wrote: > A big advantage of using ctypes is that it works cross-implementation - > on IronPython and PyPy already and on Jython soon. I'd like to see more > standard library modules use it. Distributions that choose not to > include it are crippling their Python distribution. Interes

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Nick Coghlan
Paul Moore wrote: > 2009/7/22 Christian Tismer : >> Maybe the simple solution is to prevent building extensions >> with mingw, if the python executable was not also built with it? >> Then, all would be fine I guess. > > I have never had problems in practice with extensions built with mingw > rathe

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Nick Coghlan
Christian Heimes wrote: > By the way I don't think that ctypes is the right way to go here. ctypes > is very handy if you need a quick solution. However I wouldn't use it as > a permanent solution for the subprocess module. It's tricky to get > ctypes based solutions right on multiple platforms (32

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Michael Foord
Amaury Forgeot d'Arc wrote: Hi, 2009/7/23 Christian Heimes : Lisandro Dalcin wrote: Eric seems to be working on a GSoC for PFS related to improving subprocess. Even in such case this list is not the right place to make these posts?? Eric didn't say that he is working on a GSoC

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Thomas Heller
Christian Heimes schrieb: > Can ctypes release the GIL for a function call? It will do that automatically, except for functions using the pythonapi callign convention. -- Thanks, Thomas ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Amaury Forgeot d'Arc
Hi, 2009/7/23 Christian Heimes : > Lisandro Dalcin wrote: >> Eric seems to be working on a GSoC for PFS related to improving >> subprocess. Even in such case this list is not the right place to make >> these posts?? > > Eric didn't say that he is working on a GSoC project for the PSF. Anyway > the

Re: [Python-Dev] Replacing PyWin32's PeekNamedPipe, ReadFile, and WriteFile

2009-07-23 Thread Christian Heimes
Lisandro Dalcin wrote: > Eric seems to be working on a GSoC for PFS related to improving > subprocess. Even in such case this list is not the right place to make > these posts?? Eric didn't say that he is working on a GSoC project for the PSF. Anyway the Python general mailing list might still be

Re: [Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

2009-07-23 Thread Floris Bruynooghe
On Thu, Jul 23, 2009 at 10:34:30AM +0200, M.-A. Lemburg wrote: > Python 2.6 has two standard places for installing packages: > > 1. In the stdlib site-packages/ subdir > > 2. In the user home dir's .local/lib/python2.6/site-packages dir And is missing a 3rd one. The sysadmin who wants to instal

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Paul Moore
2009/7/22 Christian Tismer : > Maybe the simple solution is to prevent building extensions > with mingw, if the python executable was not also built with it? > Then, all would be fine I guess. I have never had problems in practice with extensions built with mingw rather than MSVC - so while I'm no

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread david . lyon
> Raising it without at least glancing at the list archives which hold > copious amounts of virtual text on that topic is somewhat inappropriate > though :) Well I have consulted every available expert on the distutils list to the point where I feel 'up' with the issues at hand. They're great pe

Re: [Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

2009-07-23 Thread david . lyon
Hi Floris, That's exactly how I see it and i totally agree. My contribution is to make a Package Manager Gui that tries to be supportive of what you describe so well. If i have any complaint about the state of affairs it would only be that it takes a newcomer such a long time (months) to fully u

Re: [Python-Dev] mingw32 and gc-header weirdness

2009-07-23 Thread Antoine Pitrou
Christian Tismer stackless.com> writes: > > Despite the fact that Python probably has to be changed: > If it is true then all the 32-bit Linux Pythons have a 12 > byte GC head, IOW they are *all* badly aligned. Why are they badly aligned? The fact that long double is 12 bytes long doesn't mean i

Re: [Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

2009-07-23 Thread Floris Bruynooghe
On Wed, Jul 22, 2009 at 07:08:26PM -0400, Glenn Maynard wrote: > On Wed, Jul 22, 2009 at 5:22 PM, M.-A. Lemburg wrote: > > Maybe I've misunderstood some important detail, but how will > > their "change" help with anything other than making their > > distribution a non-standard Python installation ?

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Nick Coghlan
david.l...@preisshare.net wrote: > Distutils is a builtin module for 'pushing' a developer package 'to' pypi. > > But there is no corresponging mechanise for a user to 'pull' packages back. > > Surely this is a gap in the standard distro? > > So it is not inappropriate for me to ask about this o

Re: [Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

2009-07-23 Thread M.-A. Lemburg
David Lyon wrote: > On Wed, 22 Jul 2009 23:22:56 +0200, "M.-A. Lemburg" wrote: >> Maybe I've misunderstood some important detail, but how will >> their "change" help with anything other than making their >> distribution a non-standard Python installation ? > > The Debian/ubuntu distribution isn't

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Ben Finney
david.l...@preisshare.net writes: > >> Can I ask that you also provide a link for windows users > >> to my project: > >> > >> http://sourceforge.net/projects/pythonpkgmgr/ > > > > That doesn't seem at all appropriate; promoting third-party packages > > isn't at all what the above document should

Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-07-23 Thread Aahz
On Thu, Jul 23, 2009, INADA Naoki wrote: > > I found WriteConsoleW() API recently. > This API can write utf16 string to console directly, without change > OutputCodepage. > > example: > http://bitbucket.org/methane/hg-fixutf8-jp/src/tip/win32helper.py#cl-42 > > I think this API is good for py3k.

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread david . lyon
> That's a document describing how to use âdistutilsâ, which is what > every > recipient of Python will already have installed. > >> Can I ask that you also provide a link for windows users >> to my project: >> >> http://sourceforge.net/projects/pythonpkgmgr/ > > That doesn't seem at all app

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-23 Thread Ben Finney
David Lyon writes: > I'm on the python-dev mailing list and somebody gave me a link > to a page that you have done: > > http://docs.python.org/install/ That's a document describing how to use ‘distutils’, which is what every recipient of Python will already have installed. > Can I ask that y