Code Management

Marc Christiansen usenet at solar-empire.de
Fri Dec 7 07:17:57 EST 2007


BlueBird <phil at freehackers.org> wrote:
> On Dec 2, 4:27 pm, BlueBird <p... at freehackers.org> wrote:
>> On Nov 26, 5:07 pm, "Sergio Correia" <sergio.corr... at gmail.com> wrote:
>>
>> >Bluebird:
>>
>> > If you are using python 2.5, relative imports are no longer an
>> > issue:http://docs.python.org/whatsnew/pep-328.html
>>
>> It does not solve my problem, or I missed something:
>>
> 
> Any idea what could be wrong in my code (in the previous message). Or
> did I misunderstand relative import seriously ?

Does this give you an idea?

0:tolot:/tmp> mkdir t1 
0:tolot:/tmp> touch t1/__init__.py
0:tolot:/tmp> echo print __name__ >t1/test.py
0:tolot:/tmp> python t1/test.py
__main__
0:tolot:/tmp> python -c "import t1.test"
t1.test

Marc



More information about the Python-list mailing list