Trouble with the encoding of os.getcwd() in Korean Windows
Erik Bethke
erikbethke at gmail.com
Wed Feb 9 09:21:54 EST 2005
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 )
..... write to the file .....
..... file is written fine, and can be opened by both FireFox and IE
and displays fine ...
webbrowser.open( htmlpath.encode ( encoding ), True, True )
the line above now works fine (fixed the ascii error)
but *NOW* my problem is that FirefOX pops up a message box
complaining that the file does not exist, but it certainly does, it
just doesn't like what it is called...
Any ideas now?
Thanks,
-Erik
More information about the Python-list
mailing list