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


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

Re: problem of double import in python

Started byMohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
First post2013-09-03 05:46 +0430
Last post2013-09-03 05:46 +0430
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: problem of double import in python Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-03 05:46 +0430

#53548 — Re: problem of double import in python

FromMohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
Date2013-09-03 05:46 +0430
SubjectRe: problem of double import in python
Message-ID<mailman.529.1378170996.19984.python-list@python.org>
When i uncomment 
////
from common.interface.interface import ShowHide
////
in file contains Ui_Materials class i get the following traceback:
//////////////////////////
Traceback (most recent call last):
  File "./main.py", line 110, in <module>
    main()
  File "./main.py", line 91, in main
    interfaceObj.showMaterials()
  File
"/home/mohsen/codes/amlak/amlak/src/common/interface/interface.py", line
80, in showMaterials
    self.ui = Ui_Materials()
NameError: global name 'Ui_Materials' is not defined
//////////////////////////////////
Yours,
Mohsen
On Tue, 2013-09-03 at 05:18 +0430, Mohsen Pahlevanzadeh wrote:
> Dear all,
> 
> I remember to avoiding to confusing compiler for header, use 
> /////////////////
> // in my include file
> #define MYHEADER_H
> // and in others code use:
> #ifndef MYHEADER_H
> #include blahblah
> /////////////////////////
> 
> Unfortunately, i prevent to same error, double import to python, but i
> don't know how to solve, Even i don't know policy of python programmers.
> 
> You'll make me happy if explain me...
> 
> Yours,
> Mohsen
> 

[toc] | [standalone]


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


csiph-web