At 09:30 PM 6/5/2001 -0400, Jay Love wrote:
> > Chuck Esterbrook wrote:
> > >
> > > - Got rid of WebwarePathLocation usage. A script always knows where
> > > it's at with:
> > > os.path.dirname(os.path.join(os.getcwd(), sys.argv[0]))
> >
> > That might work. Good idea.
>
>Whoops, this'll need some work. On Linux, sys.argv[0] will be different
>depending on how the script is launched, either "python Launch.py" or
>"./Launch.py".
That's not what I would expect and don't recall experiencing that in the
past. After all, it's not even useful behavor? What version of Python and
Linux are you using?
Mine works fine:
[echuck ~]$ cat foo.py
#!/usr/bin/env python
import sys
print sys.argv
[echuck ~]$ ./foo.py
['./foo.py']
[echuck ~]$ python foo.py
['foo.py']
[echuck ~]$ uname -a
Linux 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown
>>> sys.version_info
(2, 0, 0, 'final', 1)
-Chuck
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel