Re: read() / readline() / readlines()

2005-03-09 Thread Dave Lajoie
   print line   Dave. - Original Message ----- From: Dave Lajoie To: Python-list@python.org Sent: Wednesday, March 09, 2005 12:24 AM Subject: read() / readline() / readlines() Hello!     would someone know a method that allows     to read line delimited by "\

read() / readline() / readlines()

2005-03-08 Thread Dave Lajoie
Hello!     would someone know a method that allows     to read line delimited by "\n" instead of trapping "\0" like     readlines does?   I have to write my own while loop to do this.       while myThread.isAlive() == True:    myChar = p.stdout.read(1)    if myChar == '\0':

Re: Queued stdout, flush() doesn't seems to help...

2005-03-08 Thread Dave Lajoie
int thread must terminate now!"    print "Starting Process thread"myThread = threading.Thread( target=ThreadProcess, args=() )myThread.start()   print "Starting printing thread"myPrintThread = threading.Thread(target=PrintThread, args=() )myPrintThread.start()   Dave.

Queued stdout, flush() doesn't seems to help...

2005-03-07 Thread Dave Lajoie
Hello Everyone,   I have been using this piece of code to start an exec and "process" its stdout/stderror   import sysimport popen2 executable = r'execfile -arg1 -arg2'r, w, e = popen2.popen3(executable)r.flush()w.flush()e.flush() x=0 # just print the 1000 first lineswhile x<1000:    sys.std

Re: Fork on windows

2005-03-06 Thread Dave Lajoie
pls ignore, I got open3 to work, silly mistake on my part... dave. - Original Message - From: Dave Lajoie To: Python-list@python.org Sent: Sunday, March 06, 2005 10:32 PM Subject: Fork on windows Hello Guys,     I am new to the list and to Python

Fork on windows

2005-03-06 Thread Dave Lajoie
Sorry if the question was asked. I have done several unsuccessful web search to have a definitive answer.   Obviously I would like the same code to run on both windows and linux, whenever possible I try to stay away from window specific code, but I fear I might have to do it... ;)   Any he