Trouble with the encoding of os.getcwd() in Korean Windows

Erik Bethke erikbethke at gmail.com
Wed Feb 9 08:49:52 EST 2005


Thank you Vincent, I will try this...

I did get over my troubles with this new code snippet:

      encoding = locale.getpreferredencoding()
      htmlpath = os.getcwd()
      htmlpath = htmlpath.decode( encoding )


That seems to be working well too.  I can write to these files and I
can open them with the file dialog, but this is now failing with the
famous aschii error:

webbrowser.open( htmlpath, True, True )




More information about the Python-list mailing list