I’m planning to do some java coding now. So I installed eclipse which allows me to work with both python and java. However I was really annoyed at configuring the pydev console. Firstly, I found I can not interact with the console if I run the script with “run” button. I must activate an interactive […]

It’s really a huge work for me this week to compile my nlk program with new interface into exe. I ran into a lot of problems. Fortunately, I managed to solve them through Googling. I will note some of the major problems below. 1.No module named *** : At firse I was trying py2exe. However, […]

I come up with an problem: I created an interface in pyqt4 designer, there is only a button and a status bar. I want to show a message in the status bar when I click the button. For some reason I have to put this action in a new thread. But when I click the […]

I want to save a file with a Chinese name in pyqt. It reports: IOError: [Errno 22] invalid mode (‘w’) or filename: PyQt4.QtCore.QString(u’D:/Users/zhout_000/Desktop/\u672a\u547d\u540d.dxf’) Reason: the type of the filename read from the file dialog is infact “QString”, not”string” Solve: convert QString to unicode: fileName=unicode(QtCore.QString(fileName))

#this article was transferred from my Blogger. win8 spyder the programm is totally correct, and it did give a correct out put but after the out put there is an error message reads:”spyder error: ‘import sitecustomize’ failed; use -v for traceback” solve:#8 NathanH… I decided to set an environment variable in Windows 7 to see if […]

几个月前编译完全正常的一个py文件昨天重新编译就出了一连串问题。分别解决如下。 1、首先是RuntimeError: maximum recursion depth exceeded导致编译中断。在STO提问得到解决:在setup文件开头添上: import sys sys.setrecursionlimit(5000) 即可。 2.虽然编译出了exe,但是得到的exe运行时报告缺少“_validation”。解决办法是在setup文件中将validation手动include进去,像这样: # import sys sys.setrecursionlimit(50000) from distutils.core import setup import py2exe options = { “py2exe”: {“compressed”:1, “optimize”:2, “includes”:[“scipy.sparse.csgraph._validation”,”scipy.special._ufuncs_cxx”,”sympy.printing.gtk”], “bundle_files”:1} }; setup( windows = [“”], options = options, ) 其中的scipy.sparse.csgraph._validation”,”scipy.special._ufuncs_cxx”,”sympy.printing.gtk都是根据后来的报错逐个添加进去的。期间还安装了gtk这个包。至于这是个啥?不知道。 3.最后一个问题是如下报错: OMP: Warning #178: Function GetModuleHandleEx failed OMP: System error #126: The specified module could […]