刘 烨东
unread,Apr 28, 2012, 9:53:59 AM4/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to leo-editor
OS: win32
python: python3.2.2, CPython
gui: PyQt4
leo: leo-4.10-final
When I run leo by '.../python32/python.exe .../leo-4.10-final/
launchLeo.py', [File]->[Open]->[choose-one.leo], it works.
But it doesn't work when using '.../python32/pythonw.exe .../leo-4.10-
final/launchLeo.py'. There is nothing shown in log pane.
I try to trace it, and found a Exception occurred in pr(*args, **keys)
[at leoGlobals.py]:
if print_immediately:
# Good for debugging: prints messages immediately.
sys.stdout.write(s2)
else:
# Good for production: queues 'reading settings' until after
signon.
if app.logInited:
sys.stdout.write(s2) ### Get here, but sys.stdout is None
else:
app.printWaiting.append(s2)
Finally,
1) After I change c.config.redirect_execute_script_output_to_log_pane
to True, it works.
2) change 'sys.stdout.write(s2)' to 'if sys.stdout is not None:
sys.stdout.write(s2)', it works too.
-- sean