Unfortunately I get a NameError on reloading a module in Python 2.7.
from PyQt4 import QtCore, QtGui
class MyQThread(QtCore.QThread):
    import foo
    def __init__(self, parent=None):
        super(MyQThread, self).__init__(parent)
    def run(self):
        reload(foo)
        print("Reloaded")
        #...do something
And when I use
thread = MyQThread()
thread.start()
I got this in the shell:
NameError: global name 'foo' is not defined
Any advice?
 
     
    