Problem with paths on Win 9x

John Roth johnroth at ameritech.net
Mon Nov 25 13:01:45 EST 2002


"Lexy Zhitenev" <zhitenev at cs.vsu.ru> wrote in message
news:artm3u$18mi$1 at serv.vrn.ru...
> > I'm trying to invoke a package, and I'm not getting very far.
> > C:\Python22\MyStuff\AstroPy3>python fit\FileRunner.py
CivilDateAT.htm
> CivATOut.htm
>
> > C:\PYTHON22\PYTHON.EXE: can't open file 'fit\FileRunner.py'
> > ...
> > The path to FileRunner.py is:
> >
> > c:\Python22\Lib\site-packages\fit\fit\FileRunner.py
> >
>
> Probably, you have forgotten one 'fit' dir. Your running path should
look:
>
> C:\Python22\MyStuff\AstroPy3>python fit\fit\FileRunner.py
CivilDateAT.htm
> CivATOut.htm
>
> or
>
> C:\Python22\MyStuff\AstroPy3\fit>python fit\FileRunner.py
CivilDateAT.htm
> CivATOut.htm

As I said, that doesn't work either. I've already tried it before asking
for help. Also without either 'fit'.


> Also, your package should meet certain requirements:
> 1) it must have __init__.py in its dir.
> 2) it must be a subdir of your running script or be present in your
sys.path
>
> ALL subpackages should have a __init__.py file.

It does. It's an external package.

> If you wish to run your script from a package, you have to create a
'run'
> script, something like
>
> #!/usr/bin/env python

Doesn't work on Windows systems.

>
> import fit
>
> fit.fit.FileRunner.main()
>
> or something like that.

Problem occurs earlier.

John Roth
>
> Good Luck!
> Lexy.
>
>





More information about the Python-list mailing list