Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54196
| Subject | import problem |
|---|---|
| From | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
| Date | 2013-09-16 06:53 +0430 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8.1379298217.18130.python-list@python.org> (permalink) |
Dear all,
i have the following two line codes:
############################
import ui.interface.interface
obj = ui.interface.interface.InterfaceCodes()
###########################333
I have same code in another package and work fine. but i get the :
#####################################################3
Traceback (most recent call last):
File "./main.py", line 31, in <module>
from materials.materials import *
File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
from ui.interface.interface import *
File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
from ui.materialsFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
from ui.materialsFindFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
from common.objects.objects import *
File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
obj = ui.interface.interface.InterfaceCodes()
AttributeError: 'module' object has no attribute 'interface'
###########################################
When i changed the my code to:
#################################################33
from ui.interface.interface import *
obj = ui.interface.interface.InterfaceCodes()
##############################################3
I get the :
#################################333
raceback (most recent call last):
File "./main.py", line 31, in <module>
from materials.materials import *
File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
from ui.interface.interface import *
File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
from ui.materialsFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
from ui.materialsFindFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
from common.objects.objects import *
File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
Obj = ui.interface.interface.InterfaceCodes()
NameError: name 'ui' is not defined
###############################
Also if i delete "ui.interface.interface" i get the :
########################3333
Traceback (most recent call last):
File "./main.py", line 31, in <module>
from materials.materials import *
File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
from ui.interface.interface import *
File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
from ui.materialsFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
from ui.materialsFindFrame import *
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
from common.objects.objects import *
File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
Obj = InterfaceCodes()
NameError: name 'InterfaceCodes' is not defined
############################
You make mme happy if help me....
Yours,
Mohsen
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
import problem Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-16 06:53 +0430
Re: import problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-16 02:56 +0000
Re: import problem Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-16 08:35 +0430
Re: import problem Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-16 11:14 +0430
Re: import problem Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-16 11:26 +0430
Re: import problem Dave Angel <davea@davea.name> - 2013-09-16 14:08 +0000
csiph-web