Re: Trouble with the encoding of os.getcwd() in Korean Windows
From: Walter Dörwald (walter_at_livinglogic.de)
Date: 02/09/05
- Next message: Tom Brown: "Re: win32 service and sockets"
- Previous message: Ian Bicking: "Re: Prepending to traceback"
- In reply to: Erik Bethke: "Re: Trouble with the encoding of os.getcwd() in Korean Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 09 Feb 2005 18:11:02 +0100 To: Erik Bethke <erikbethke@gmail.com>
Erik Bethke wrote:
> Hello All,
>
> sorry for all the posts... I am *almost* there now...
>
> okay I have this code:
>
> import sys, os
>
> encoding = locale.getpreferredencoding()
> htmlpath = os.getcwd()
> htmlpath = htmlpath.decode( encoding )
You might want to try os.getcwdu() instead of this. According to
http://www.python.org/doc/2.4/lib/os-file-dir.html
this has been added in Python 2.3 and should work on Windows.
Bye,
Walter Dörwald
- Next message: Tom Brown: "Re: win32 service and sockets"
- Previous message: Ian Bicking: "Re: Prepending to traceback"
- In reply to: Erik Bethke: "Re: Trouble with the encoding of os.getcwd() in Korean Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|