[Edu-sig] Re: PEPTALK: path sanity and newbie

Arthur ajs@optonline.net
Sun, 06 Jul 2003 20:50:14 -0500


>Even if all authors developed perfect packages, and all users installed
them
>100% per instructions, that still would not address the core issues which
>all users need to apply for their own files, folders and modules and
setting
>paths for them.

Not getting it still.  In Windows, once you install Python or ActivePython
as a self-installing executable there should be no reason, under normal
circumstances, to have to touch path issues again. What ever needs to be
done with the environment variables, is done at set-up.

There are a few things that should be understood, about either using .pth
files to extend the search path, or the magic of __init__.py files in
sub-directories of the search path.

But those are usually developer, distributer issues, not user issues That
magic is normally hidden from the user (in the sense they don't *need* to
understand it) if the application or library chooses to play by the
installation rules. I, for example, don't expect a PyGeo user to have a
handle on any of that.  It took me a while (we witnesses it here) to
understand my "responsibilities" as a distributor of Python software.  But
it took me a few years to have anything to distribute.

Once PyGeo is installed (I am assuming the README instructions are read and
followed), one should be able to run a PyGeo script from any directory,
using any editor capable of automating nothing more than a call of "python
pathtoscript/pygeoscript.py". I find an editor near essential as an
intermediary only because I do find navigating paths through Python's os
module cumbersome, and since it can't be assumed the the callable script
pygeoscript.py is on any path, than one must call it, if at a prompt, either
by navigating to its directory, or calling it through its fully qualified
pathname.  I find it much easier to pull it up in a editor and run it from
there (where the call to the fully qualified pathname is essentially
automated).  Textpad (for Windows), IDLE, SciTE (crossplatform) are the ones
I happen to haved used. The Big Guys do emacs or vim.

But since I am used to calling Python scripts through an editor, I can get
flumaxed when a parameter is needed.  Easy in Textpad, possible but a little
clumsey (IMO) in SciTE, still don't see it, off hand, in IDLE.  Truth is I
use IDLE mostly for its interactive prompt, and don't know its editor
features very well.

That being said, I would say your frustration still sounds a little
non-specific.  Maybe the fact I had taken a shot at confronting Java
classpath issues, when Java was young, helped me approach all these issues
as they exist in Python with relative equanimity.

The issues I have now are mostly on Linux, and these are usually related to
the Linux distribution install of Python, (usually a version or sub-version
behind what I might choose to be using), versus the installation of the
version I choose to work with.  From a brief converstaion with the Red Hat
guys who attended the Python conference in DC, I began to understand how
strictly their hands are tied by rules related to directory structures of a
distribution.

And therefore how unavoidable are some of these issues as they exist on
Linux.

The burden there of getting a handle on a potentially more complex lay of
the land with a dual install of Python, ends up on the user, as is normally
understood to be so in Linux world.

But I would say that I remain convinced that something about your wish
list - I don't, again think you are being clear - is related to some
unavoidable realities of crossplatform distribution.  The kinds of issues
over which Python has little to no control.

BTW,  I have succesfully created full stand-alone, self-installing versions
for  Windows of both VPython and PyGeo,which include their own Python
runtime environment and their own customized versions of SciTE.  These
installs assume no prior Python installation, nor would they disturb one
that existed.

Alice (boo!), for example, and many other apps have taken that tack.

I may well deploy PyGeo in that form as one alternative. If I ever finish
the damn docs.

All that being said I can't say, all in all, I have my hands fully around
the issue you are trying to express.

Beyond some frustration.

My suggestion is slow down.  Fewer assumptions and preconceptions. Read the
damn README - I don't mean to be insulting, but apparently, you didn't.

The hardest part might be in being satisfied to start at the beginning. With
deliberation. Without shortcuts

But I had to come to terms with doing just that, when I was considerably
older than you.

Art