Re: Newbie: module structure and import question

2005-01-16 Thread Rob Emmons
> yes i know it's related to search path, but i don't know how to set it in a > practical way (beside hard coding). > my concern is, if i want to create a custom module/library, i don't know > what py file will import it and where the working directory should be. Regarding where the current workin

Re: Newbie: module structure and import question

2005-01-14 Thread Ziong
Thx Rob. yes i know it's related to search path, but i don't know how to set it in a practical way (beside hard coding). my concern is, if i want to create a custom module/library, i don't know what py file will import it and where the working directory should be. sometime like my example, even i

Re: Newbie: module structure and import question

2005-01-13 Thread Rob Emmons
> hi all, > i have question on how to design a module structure. > for example, i have 3 files. > [somewhere]/main.py > [somewhere]/myLib/Base/BaseA.py > [somewhere]/myLib/ClassA.py > > . > It's fine when i run main.py. > however when i run ClassA.py individually, it would fail in import >

Newbie: module structure and import question

2005-01-12 Thread Ziong
hi all, i have question on how to design a module structure. for example, i have 3 files. [somewhere]/main.py [somewhere]/myLib/Base/BaseA.py [somewhere]/myLib/ClassA.py main.py === from myLib.ClassA import ClassA a = classA() dir(a) myLib/ClassA.py === from myLib.Base.BaseA impo