A suggestion for python 2.1.
Thaddeus L. Olczyk
olczyk at interaccess.com
Thu Oct 19 13:42:10 EDT 2000
On 19 Oct 2000 14:01:03 GMT, raja at cs.indiana.edu (Raja S.) wrote:
>since you seem to be running your scripts under Unix, why don't you just
>use the conventional shell trick ?
>
Why do people always jump on stupid and rash assumptions.
At no point do I say that I am using UNIX. There are no statements
that rule out all other operating systems.
The fact is that I am A REAL PROGRAMMER who writes REAL PROGRAMS
that are used in REAL CIRCUMSTANCES, not some student who tools around
on one computer. My scripts have to run on both Windows and UNIX (
linux, Solaris ) machines ( they should and probably do also run on
any other OS but I cannot test those ). They need to run on different
UNIXes that put python in different directories. The scripts can be
placed in all sorts of different locations. Thus the need for tools
like autoconfand automake. Maybe when you get out in the real world
and do some real world programming you will understand this.
As for the suggestion there are three points to consider in the
propsal:
1) Compared to most other changes, this one is relatively easy to
implement ( say compared to adding braces and removing indentation
to denote blocks ). Most of the code has already been written to
handle loading modules.
2) It will releave programmers of a lot of configuration nightmares
when dealing with scripts that move around often. As ONE example
( note this is not the only example this is the one that I have
recently experienced lest some dufus come along and complain
that is to small a cicumstance ), often the build systems that I
work with start out with a directory say foo and foo/pylib is
where the scripts are stored. Later code is added and expanded on
suddenly the project is in directory bar and foo is found in
bar/a/b/c/foo. Either the scripts stay in foo/pylib, or (
preferably ) moved to bar/pyLib but with a lot of reconfiguration
of build scripts.
3) One can use "shadow computation". For exmple youcan have two
scripts called foo.py in directories a and b. Normally one wants
to execute the a/foo.py script. Occasionally one wants to use
b/foo.py. Initially define PYTHONSCRIPTPATH=a:b. Later redefine it
PYTHONSCRIPTPATH=b.
More information about the Python-list
mailing list