[PyQt] Problems about pyqt, py2exe and unicode!

drizt drizt.ruan at gmail.com
Wed Jul 8 14:08:06 BST 2009


I have a testing code trying to get a filename from UI and open the
file, the code is like this:

filename = QFileDialog.getOpenFileName(self, u"Select File")
fileOpen = open(self.filename,  'rb')

When i want to open some Unicode file ,the code works allright in python
script, but failed after compiling with py2exe, the log is like this:

IOError: [Errno 2] No such file or directory:
PyQt4.QtCore.QString(u'C:/Documents and Settings/.../My Documents/\u65b0
\u5efa \u6587\u672c\u6587\u6863.txt')

What's the problem?


	Regards
drizt.ruan



More information about the PyQt mailing list