Re: importing a package

2005-06-22 Thread Benedict Verheyen
Damjan wrote: >>Indeed, when i do this, then it works >>import sys >>sys.path.append('package') >> >>However, why is it that package isn't added automatically to the pad? > > > When you execute a python program the directory where the program is is > automatically added to sys.path. No other dire

Re: importing a package

2005-06-22 Thread Damjan
> Indeed, when i do this, then it works > import sys > sys.path.append('package') > > However, why is it that package isn't added automatically to the pad? When you execute a python program the directory where the program is is automatically added to sys.path. No other directory is added to the d

Re: importing a package

2005-06-22 Thread flupke
Damjan wrote: >>I developed a package with a structure like this >>src/ >>tesfile.py >>dir1/ >>__init__.py >>file1.py >>dir2/ >>__init__.py >>file2.py > > > Importing dir2/file2 from dir1/file1.py works here, because when yuo started > the testfile scri

Re: importing a package

2005-06-22 Thread Damjan
> I developed a package with a structure like this > src/ > tesfile.py > dir1/ > __init__.py > file1.py > dir2/ > __init__.py > file2.py Importing dir2/file2 from dir1/file1.py works here, because when yuo started the testfile script the src/ directory w