[Python-de] Import-Problemchen...
Andreas Pakulat
apaku at gmx.de
Sam Jul 1 14:34:48 CEST 2006
Hi,
hab hier ein kleines Problem mit import-Zeug.
Ich hab ein Programm von mir "umgestrickt" so dass es mittels setuptools
in ein egg gepackt werden kann.
Ich habe jetzt folgendes Layout:
<project-root>
|
|-- pyfilmdbsimpleui
|
|-- lib
|-- plugins
|-- widgets
|-- models
|-- resource
|-- ui
|-- pyfilmdbsimpleui.py
|-- mainwindow.py
Wenn ich jetzt in project-root
python pyfilmdbsimpleui/pyfilmdbsimpleui.py ausfuehre bekomme ich:
andreas at morpheus:~/projects/pyfilmdbsimpleui>python pyfilmdbsimpleui/pyfilmdbsimpleui.py
Traceback (most recent call last):
File "pyfilmdbsimpleui/pyfilmdbsimpleui.py", line 31, in ?
from mainwindow import MainWindow
File "/home/andreas/projects/pyfilmdbsimpleui/pyfilmdbsimpleui/mainwindow.py", line 4, in ?
from widgets.mainwidget import MainWidget
File "/home/andreas/projects/pyfilmdbsimpleui/pyfilmdbsimpleui/widgets/mainwidget.py", line 4, in ?
from pyfilmdbsimpleui.models.moviemodel import MovieModel
File "/home/andreas/projects/pyfilmdbsimpleui/pyfilmdbsimpleui/pyfilmdbsimpleui.py", line 31, in ?
from mainwindow import MainWindow
ImportError: cannot import name MainWindow
Das Skript faengt so an:
from PyQt4.QtGui import QApplication
import sys
from mainwindow import MainWindow
Ein anderes Projekt dass ich letztens umgestellt hat, zeigt diese Fehler
nicht und auch dort ist das Skript und der Main-Widget im selben
Verzeichnis.
Auch die setup.py hat keine weiteren Unterschiede, ich habe die vom
anderen Projekt einfach rueberkopiert...
Ist natuerlich etwas unguenstig bzgl. Entwicklung das immer installieren
zu muessen, also hat jmd. nen Tipp was ich hier falsch mache?
Andreas
--
Don't look now, but there is a multi-legged creature on your shoulder.
More information about the python-de
mailing list