[IPython-user] unicode and change directory problem
Tue Jan 20 04:25:23 CST 2009
2009/1/20 Vicent Mas <firstname.lastname@example.org>:
> I'm a newbie having problems with the cd command. My platform is
> windows xp. I want to change to a directory whose unicode
> representation is u'para\u0140lel'. If I issue a ls command that
> directory is properly listed.
> However I don't know how to change to the directory using the cd
> command because the U'0140 character is not mapped to any key in the
> keyboard. I've tried several things: passing the unicode string to cd
> fails, passing the unicode string encoded with sys.stdin.encoding
> fails too. Passing the unicode string encoded with
> sys.getfilesystemencoding() fails again. So what have I to do for
> changing to that directory?
Have you tried os.chdir(u'para\u0140lel') ?
I'm not sure if it will work, but it's worth a try :-)
More information about the IPython-user