- #1
daniel_i_l
Gold Member
- 868
- 0
For some reasons, if I fork a process (or start a thread) in python and let the original program wait for user input, the the forked process doesn't print anything to the screen until the newline character is printed. For example (i used '----' instead of indent):
print 'test' (without comma)
then it does.
Why is this?
Thanks
doesn't print any thing to the screen. But if the 3rd line is instead...
ret = os.fork()
if ret == 0:
----print 'test',
else:
----data = raw_input('input: ')
print 'test' (without comma)
then it does.
Why is this?
Thanks