[Python-Dev] Re: Change to sys.path[0] for Python 2.3 (original) (raw)
James C. Ahlstrom jim@interet.com
Mon, 26 Nov 2001 10:43:04 -0500
- Previous message: [Python-Dev] Re: Change to sys.path[0] for Python 2.3
- Next message: [Python-Dev] Re: Change to sys.path[0] for Python 2.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Martin v. Loewis" wrote:
It's not clear to me what this patch would do, so I disagree.
You are right. I wasn't clear enough. Everyone please vote on the following:
JimA writes import documentation and adds it to the current docs (where are they?) or in a new section (where should it go?).
The addition of sys.path[0] is changed to an earlier time so it occurs before any imports; so sys.path[0] works the same as sys.path[1:]. Currently it is added after some imports have occurred.
sys.path[0] is documented as the directory of the Python script and is an absolute path. In particular, "" is replaced with getcwd() (or equivalent for all supported OS's).
So far, I have "+1", "True" and "Unimplementable in general" in the voting for item 3.
For the "-c" option, sys.argv[0] is getcwd() instead of "".
JimA
- Previous message: [Python-Dev] Re: Change to sys.path[0] for Python 2.3
- Next message: [Python-Dev] Re: Change to sys.path[0] for Python 2.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]