> Perhaps the parent should open the pipe for reading, before calling
> TroublesomeFunction. If the parent then dies, the child will get a "broken
> pipe" signal, which by default should kill it.
Yeah, that seems to work well, I think. Thanks for the help! I also
realised the child process was co
In message
<[EMAIL PROTECTED]>, Iain
wrote:
> Well I did work out *a* solution this way:
>
> pipename = os.tmpnam()
> os.mkfifo(pipename)
> pid = os.fork()
> if pid==0:
> fifoobj = open(pipename,"w")
> fifoobj.write(streamobj.read())
> fifoobj.close()
> os.unlink(pipename)
On Nov 8, 10:00 am, Iain <[EMAIL PROTECTED]> wrote:
> On Nov 7, 4:42 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
>
> central.gen.new_zealand> wrote:
> > In message
> > <[EMAIL PROTECTED]>, Iain
> > wrote:
>
> > > Can someone give me some pointers as to how I might create some sort
> > > of blocking
On Nov 7, 4:42 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message
> <[EMAIL PROTECTED]>, Iain
> wrote:
>
> > Can someone give me some pointers as to how I might create some sort
> > of blocking device file or named pipe ...
>
> mkfifo /path/to/named/pipe
Th
In message
<[EMAIL PROTECTED]>, Iain
wrote:
> Can someone give me some pointers as to how I might create some sort
> of blocking device file or named pipe ...
mkfifo /path/to/named/pipe
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a function that only accepts filenames, rather than file-like
objects (because its a wrapper around a C++ function, I think).
I want to feed some potentially large "files" into this function, but
they are coming in as streams (eg from a url) and so are only
represented in my code as fi