> I find it impossible to believe that adding a space character to s
> will cause sys.stdout.write(s+'\n') to fail.

The problem is not related to the string being written to stdout.  The
problem occurs if the Leo file being loaded is located in a directory
containing a space.

I have found a workaround by redirecting stdout to a log file when
launching pythonw from a dos batch file as follows:

   cd  c:\Leo\leo-editor
   Pythonw  leo\core\runLeo.py  %1  >  Log.txt

When the Leo file is located in a directory with spaces, the Log.txt
file is written to immediately during Leo startup.  When the Leo file
is located in a directory without spaces, the Log.txt file is empty
after the Leo startup code has completed but is being cached
somewhere.  Once I start working with the Leo file, more text is sent
to stdout and the cache is written to the Log.txt file.  I have no
idea why a space in the directory name has an effect on the caching of
output to stdout.

Note: I have added an entry to bug report #319684 - "Vim plugin error
- print ('vim_cmd: %s' % vim_cmd)" requesting that the bug be closed.
The print statement added to the Vim plugin was flushing the stdout
cache and causing the error reported in this forum post.

TL
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to