title: Where is the error coming from?
body: <p>I'm getting this error but I don't have any idea what I'm doing wrong:</p>
  
  <pre><code>&gt;&gt;&gt; runfile('C:/Users/218003107/callphreeqcInput.pyw', wdir=r'C:/Users/218003107')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\218003107\AppData\Local\Continuum\Anaconda\lib\site-
   packages\spyderlib\widgets\externalshell\sitecustomize.py", line 580, in runfile
      execfile(filename, namespace)
    File "C:/Users/218003107/callphreeqcInput.pyw", line 5, in &lt;module&gt;
      class MyForm(QtGui.QMainWindow, phreqMDI.Ui_MainWindow):
  NameError: name 'phreqMDI' is not defined
  &gt;&gt;&gt;"
  </code></pre>
  
  <p>I'm running this code:</p>
  
  <pre><code>import sys
  from PyQt4 import QtCore, QtGui
  from phreqMDI import *
  
  class MyForm(QtGui.QMainWindow, phreqMDI.Ui_MainWindow):
      def __init__(self, parent=None):
          super(MyForm,self).__init__(parent)
          self.ui=Ui_MainWindow()
          self.ui.setupUi(self) 
          self.connect(wt1,SIGNAL('textChanged()'),wtResult)
          self.connect(wt2,SIGNAL('textChanged()'),wtResult)
          self.connect(wt3,SIGNAL('textChanged()'),wtResult)
          self.connect(wt4,SIGNAL('textChanged()'),wtResult)
  
  
      def wtResult(self):
          if len(self.ui.wt1.text())!=0:
              a=float(self.ui.wt1.text())
          else:
              a=0
          if len(self.ui.wt2.text())!=0:
              b=float(self.ui.wt2.text())
          else:
              b=0
          if len(self.ui.wt3.text())!=0:
              c=float(self.ui.wt3.text())
          else:
              c=0
          if len(self.ui.wt4.text())!=0:
              c=float(self.ui.wt4.text())
          else:
              d=0                      
          sum=a+b+c+d
          self.ui.wt_total.setText(str(sum)) 
  
  if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      =MyForm()
      myapp.show()
      app.exec_()
  </code></pre>
  
  <p>Here are the first few lines (not showing all 500 lines) of the ui file that created using Qt Designer and converted to .py with pyuic4 (which went fine):</p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      def _fromUtf8(s):
          return s
  
  try:
      _encoding = QtGui.QApplication.UnicodeUTF8
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig, _encoding)
  except AttributeError:
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig)
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName(_fromUtf8("MainWindow"))
          MainWindow.resize(800, 677)
          self.centralwidget = QtGui.QWidget(MainWindow)
          self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
  </code></pre>
  
  <p>What am I doing wrong here ?</p>