YoHell - 2010-02-16

Once again I forget that sourceforge kills indent from details. Not good for python source. Trying with a comment instead.

BEFORE:
def stdin_reader(self): # dedicated thread for reading standard input
import sys
while 1:
l = sys.stdin.readline()
if l!=\"\":
if self.nest==0:
# if we\'re reading embedded input on stdin
# then bypass PyMOL C code altogether
if self.layer[0].embed_sentinel!=None:
self.parse(l)
else:
self.cmd.do(l)
else:
self.cmd.do(l)
elif not self.cmd._pymol.invocation.options.keep_thread_alive:
self.cmd.quit()
self.cmd._pymol._stdin_reader_thread = None

AFTER:
def stdin_reader(self): # dedicated thread for reading standard input
import sys
while 1:
l = sys.stdin.readline()
if l!=\"\":
if self.nest==0:
# if we\'re reading embedded input on stdin
# then bypass PyMOL C code altogether
if self.layer[0].embed_sentinel!=None:
self.parse(l, False) ### CHANGED LINE
else:
self.cmd.do(l)
else:
self.cmd.do(l)
elif not self.cmd._pymol.invocation.options.keep_thread_alive:
self.cmd.quit()
else: ### ADDED LINE (break out instead?)
import time
time.sleep(0.001)
self.cmd._pymol._stdin_reader_thread = None