How to install PyQt4 in anaconda?

Updated version of @Alaaedeen’s answer. You can specify any part of the version of any package you want to install. This may cause other package versions to change. For example, if you don’t care about which specific version of PyQt4 you want, do: conda install pyqt=4 This would install the latest minor version and release … Read more

Should wildcard import be avoided?

The answer to your question’s title is “yes”: I recommend never using from … import *, and I discussed the reasons in another very recent answer. Briefly, qualified names are good, barenames are very limited, so the “third option” is optimal (as you’ll be using qualified names, not barenames) among those you present. (Advantages of … Read more

Unable to load files using pickle and multiple modules

The issue is that you’re pickling objects defined in Settings by actually running the ‘Settings’ module, then you’re trying to unpickle the objects from the GUI module. Remember that pickle doesn’t actually store information about how a class/object is constructed, and needs access to the class when unpickling. See wiki on using Pickle for more … Read more

Debugging a pyQT4 app?

You need to call QtCore.pyqtRemoveInputHook. I wrap it in my own version of set_trace: def debug_trace(): ”’Set a tracepoint in the Python debugger that works with Qt”’ from PyQt4.QtCore import pyqtRemoveInputHook # Or for Qt5 #from PyQt5.QtCore import pyqtRemoveInputHook from pdb import set_trace pyqtRemoveInputHook() set_trace() And when you are done debugging, you can call QtCore.pyqtRestoreInputHook(), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)