Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39032 > unrolled thread

Re: Eric - "No module named MainWindow"

Started byJoel Goldstick <joel.goldstick@gmail.com>
First post2013-02-17 10:13 -0500
Last post2013-02-17 10:13 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Eric - "No module named MainWindow" Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-17 10:13 -0500

#39032 — Re: Eric - "No module named MainWindow"

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2013-02-17 10:13 -0500
SubjectRe: Eric - "No module named MainWindow"
Message-ID<mailman.1897.1361114039.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

On Sun, Feb 17, 2013 at 6:35 AM, Vincent Vande Vyvre <
vincent.vandevyvre@swing.be> wrote:

> Le 17/02/13 10:08, Phil a écrit :
> > Thank you for reading this.
> >
> > I've been playing with Eric all day and I almost have a working GUI
> > application, but not quite. I have followed the two tutorials on the
> > Eric site and I'm sure that I haven't miss entered anything and so I
> > think the error is the result of something missing from my system or
> > perhaps a path error.
> >
> > This is the error message:
> >
> > The debugged program raised the exception unhandled ImportError
> > "No module named MainWindow"
> > File: /home/phil/main.py, Line: 4
> >
> > And this is the code:
> >
> > !/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()
> >
> > I have tried mainWindow and mainwindow as well so it appears not to be
> > a case error.
> >
> Are you sure you have a class MainWindow in your ui.MainWindow.py ?
>

I just looked at the tutorial that you might be experimenting with on this
page: http://eric-ide.python-projects.org/tutorials/MiniBrowser/index.html

The class MainWindow is in mainwindow.py in the ui folder.  I would try
this:

from ui.mainwindow import MainWindow





> --
> Vincent V.V.
> Oqapy <https://launchpad.net/oqapy> . Qarte
> <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web