2005年05月01日 星期日 22:08
我没有用过PyQT,不过从出错信息来看,我觉得是filePath.ascii()的问题。 这个PyXEdit是个什么东东? On 5/1/05, Xia Gao <xiaogao at mails.tsinghua.edu.cn> wrote: > > 大家好! > > 我是Python的初学者,今天用PyQT遇到一个问题:当用"打开"对话框打开文件时,如果不是中文文件名,就可以打开;否则会出现以下异常: > Traceback (most recent call last): > File "F:\Python\PyXEdit\QXEMainWindow.py", line 132, in fileOpen > self.loadFile(filePath) > File "F:\Python\PyXEdit\QXEMainWindow.py", line 158, in loadFile > text = codecs.open(filePath.ascii().encode("mbcs"), "r", > "mbcs").read().enco > de("utf-8") > File "C:\Python24\lib\codecs.py", line 607, in open > file = __builtin__.open(filename, mode, buffering) > IOError: [Errno 2] No such file or directory: > 'F:/Python/PyXEdit/Test?????.txt' > 问题应该是中文文件名不能处理。请大家帮忙想想办法,谢谢! > > 致 > 礼! > > > Xia Gao > xiaogao at mails.tsinghua.edu.cn > 2005-05-01 > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- Qiangning Hong Get Firefox! < http://www.spreadfirefox.com/?q=affiliates&id=67907&t=1> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050501/f149337a/attachment.htm
2005年05月02日 星期一 16:41
你好, 问个有关输出精度控制的问题。 定义一个复数型的变量,如1.3256998888884631321313132+ 5.3256998888884631321313132j 想输出它的全部精度 该如何控制? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050502/78330d4f/attachment.htm
Zeuux © 2025
京ICP备05028076号