Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'attribute': 0.07; 'skip:" 60': 0.07; 'skip:u 30': 0.07; '40,': 0.09; 'obj': 0.09; 'skip:# 30': 0.09; '24,': 0.16; '32,': 0.16; 'fine.': 0.16; 'nameerror:': 0.16; 'subject:import': 0.16; 'skip:# 20': 0.16; 'all,': 0.19; 'import': 0.22; '31,': 0.24; 'subject:problem': 0.24; 'defined': 0.27; 'skip:" 20': 0.27; 'code': 0.31; "skip:' 10": 0.31; 'file': 0.32; 'another': 0.32; '(most': 0.33; 'skip:u 20': 0.35; 'but': 0.35; '14,': 0.36; 'skip:" 50': 0.36; 'yours,': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'skip:u 10': 0.60; 'name': 0.63; 'dear': 0.65; 'mme': 0.91 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pahlevanzadeh.org; s=default; h=Content-Transfer-Encoding:Mime-Version:Content-Type:Date:To:From:Subject:Message-ID; bh=SmKlqqw8Os2deRwqiu+g9FBrH35nn+OE+Q0POxe2TOU=; b=Vfkd8Z+AE6Z2TtRnP3Suy3G2/XpLpCLqZktitkJSpQ5CMiJB9/jK0ZgGawPEyeOqUrSDVjMpkvIcmGExENatxh773iaG3GiWwkiVTlK/GNPbLkKeuUucGD9FRCA4wSAZ0AIvGzKsfDSsAxUOcgQua2i8qznWhalIGUh1/Dti2Tk=; Subject: import problem From: Mohsen Pahlevanzadeh To: python-list@python.org Date: Mon, 16 Sep 2013 06:53:26 +0430 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-4+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - part7.royal-servers.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pahlevanzadeh.org X-Get-Message-Sender-Via: part7.royal-servers.com: authenticated_id: mohsen@pahlevanzadeh.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 86 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379298217 news.xs4all.nl 15871 [2001:888:2000:d::a6]:38686 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54196 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 from materials.materials import * File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line 40, in from ui.interface.interface import * File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py", line 32, in from ui.materialsFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line 24, in from ui.materialsFindFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py", line 14, in from common.objects.objects import * File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py", line 28, in 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 from materials.materials import * File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line 40, in from ui.interface.interface import * File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py", line 32, in from ui.materialsFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line 24, in from ui.materialsFindFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py", line 14, in from common.objects.objects import * File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py", line 28, in 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 from materials.materials import * File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line 40, in from ui.interface.interface import * File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py", line 32, in from ui.materialsFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line 24, in from ui.materialsFindFrame import * File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py", line 14, in from common.objects.objects import * File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py", line 28, in Obj = InterfaceCodes() NameError: name 'InterfaceCodes' is not defined ############################ You make mme happy if help me.... Yours, Mohsen