ImportError in eric4
rhill
rhill at raymondhill.net
Wed Dec 23 08:02:25 EST 2009
I am new to Linux/Python/Eric4 (not in development though).
So I am trying to start a small application as per tutorial found at
eric-ide.python-projects.org:
http://eric-ide.python-projects.org/tutorials/LogParser/chap1.html
My application is similarly structured. Final step, I try to execute it
(Run Project...), and I get:
/=====
The debugged program raised the exception unhandled ImportError
"No module named ui.MainWindow"
File: /home/xxx/xxx/my first project/main.py, Line: 4
Break here?
\=====
Here is the content of main.py:
/=====
#!/usr/bin/python
from PyQt4.QtGui import QApplication
from ui.MainWindow import MainWindow
def main():
import sys
app = QApplication(sys.argv)
wnd = MainWindow()
wnd.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
\=====
As per tutorial. The file MainWindow.py *really* exists, and is *really*
located inside the folder 'ui' which itself is inside 'my first project'
(the root of the project I am working on.)
I couldn't find anything meaningful help through google, so here I am.
Why is the file ./ui/MainWindow.py not seen by the python interpreter?
More information about the Python-list
mailing list