Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 20, 7:06 pm, Aaron Brady wrote: > On Dec 18, 7:21 pm, "Gabriel Genellina" > wrote: > > > > > En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady   > > escribió: > snip > > > Will it take calling > > > 'CreatePipe' from ctypes directly if on Windows?  Or can 'os.pipe' be > > > made to abstract

Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 18, 7:21 pm, "Gabriel Genellina" wrote: > En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady   > escribió: snip > On Windows, file handles are the real OS stuff, the "true" reference to an   > open file. File descriptors are not, they exist only to please the C   > runtime library. Programs n

Re: subprocess.Popen inheriting

2008-12-18 Thread Aaron Brady
On Dec 18, 6:11 pm, "Gabriel Genellina" wrote: > En Thu, 18 Dec 2008 08:35:58 -0200, Aaron Brady > escribió: > > > > > On Dec 17, 7:16 pm, "Gabriel Genellina" > > wrote: > >> En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady   > >> escribió: > > >> > On Dec 17, 5:05 pm, "Gabriel Genellina" > >>

Re: subprocess.Popen inheriting

2008-12-18 Thread Gabriel Genellina
En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady escribió: On Dec 17, 7:16 pm, "Gabriel Genellina" wrote: En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady   escribió: > On Dec 17, 5:05 pm, "Gabriel Genellina" > wrote: >> En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   >> escribió:

Re: subprocess.Popen inheriting

2008-12-18 Thread Gabriel Genellina
En Thu, 18 Dec 2008 08:35:58 -0200, Aaron Brady escribió: On Dec 17, 7:16 pm, "Gabriel Genellina" wrote: En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady   escribió: > On Dec 17, 5:05 pm, "Gabriel Genellina" > wrote: >> En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   >> escribió: >

Re: subprocess.Popen inheriting

2008-12-18 Thread Aaron Brady
On Dec 17, 7:16 pm, "Gabriel Genellina" wrote: > En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady   > escribió: > > > > > On Dec 17, 5:05 pm, "Gabriel Genellina" > > wrote: > >> En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   > >> escribió: > > >> > It would be nice if Python created pipes

Re: subprocess.Popen inheriting

2008-12-18 Thread Aaron Brady
On Dec 17, 7:16 pm, "Gabriel Genellina" wrote: > En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady   > escribió: > > > > > On Dec 17, 5:05 pm, "Gabriel Genellina" > > wrote: > >> En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   > >> escribió: > > >> > It would be nice if Python created pipes

Re: subprocess.Popen inheriting

2008-12-17 Thread Gabriel Genellina
En Wed, 17 Dec 2008 22:46:32 -0200, Aaron Brady escribió: On Dec 17, 5:05 pm, "Gabriel Genellina" wrote: En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   escribió: > It would be nice if Python created pipes that are properly inheritable by > default by child processes, as they're mos

Re: subprocess.Popen inheriting

2008-12-17 Thread Aaron Brady
On Dec 17, 5:05 pm, "Gabriel Genellina" wrote: > En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders   > escribió: > > > Aaron Brady wrote: > > >> I thought so too.  The web seems to say that on Linux they are, and on > >> Windows, you need to call DuplicateHandle for it. > > Or set bInheritHandle

Re: subprocess.Popen inheriting

2008-12-17 Thread Gabriel Genellina
En Wed, 17 Dec 2008 12:21:38 -0200, Jeremy Sanders escribió: Aaron Brady wrote: I thought so too. The web seems to say that on Linux they are, and on Windows, you need to call DuplicateHandle for it. Or set bInheritHandle=True when creating the pipe initially. os.pipe() doesn't do that

Re: subprocess.Popen inheriting

2008-12-17 Thread Jeremy Sanders
Aaron Brady wrote: > I thought so too. The web seems to say that on Linux they are, and on > Windows, you need to call DuplicateHandle for it. I hit this problem - it looks like pipes aren't very versatile on Windows. There's also the complicating factor that the handles in windows aren't the sa

Re: subprocess.Popen inheriting

2008-12-16 Thread Aaron Brady
On Dec 16, 4:15 am, "Gabriel Genellina" wrote: > En Tue, 16 Dec 2008 07:29:19 -0200, Aaron Brady   > escribió: > > > I have a file handle I want to inherit in a child process.  I am > > looking at '_make_inheritable' in 'Popen', but it needs an instance, > > and by the time I have one, the subpro

Re: subprocess.Popen inheriting

2008-12-16 Thread Gabriel Genellina
En Tue, 16 Dec 2008 07:29:19 -0200, Aaron Brady escribió: I have a file handle I want to inherit in a child process. I am looking at '_make_inheritable' in 'Popen', but it needs an instance, and by the time I have one, the subprocess is already running. Can't I call 'Popen._make_inheritable

subprocess.Popen inheriting

2008-12-16 Thread Aaron Brady
Hi, I have a file handle I want to inherit in a child process. I am looking at '_make_inheritable' in 'Popen', but it needs an instance, and by the time I have one, the subprocess is already running. Can't I call 'Popen._make_inheritable( None, handle )'? The method does not use 'self'. -- http