On Jan 21, 11:18 am, TL <[email protected]> wrote:
> If I load a Leo file from a directory path with a space character in
> WinXP, I receive the following error during the Vim emulation key
> remapping:
> ...
> redefining shortcut     Ctrl+bracketleft from set-command-state (all)
> to unindent-region (all)
> redefining shortcut     Ctrl+y from scroll-outline-up-line (all) to
> yank (all)
> Traceback (most recent call last):
>   File "C:\_Proj\Leo\leo-editor\leo\core\leoGlobals.py", line 3077, in
> pr
>     sys.stdout.write(s+'\n')
> IOError: [Errno 9] Bad file descriptor
> redefining shortcut               Ctrl+y from scroll-up (all) to yank
> (all)
> setting HOME to os.getenv('USER'): 'TL'
> ...
>
> If I load the same file from a directory path without spaces, I don't
> get the error.

I just performed this and all is well.

Let us be clear.  The traceback clearly indicates that it is indeed
the line:

    sys.stdout.write(s+'\n')

that is failing.

I suspect that sys.stdout has been broken and that sys.stdout is
attempting to writeto an invalid file descriptor. I suggest doing the
following:

1. Replace sys.stdout with sys.__stdout__.  This will use an unbroken
stream.  It should make the problem go away.

2. If the problem does go away, try printing the value of sys.stdout
itself.  This should tell you what stream is being used.

Edward
--~--~---------~--~----~------------~-------~--~----~
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