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 "\
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':
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.
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
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
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