[Edu-sig] subprocess.py and the PyXR tool and site

Arthur ajsiegel at optonline.net
Sun Jan 9 19:28:15 CET 2005


Guess I'm just lucky.

John Zelle focusing us (me) on some of the complexities of PyShell of
Idle

then my own issues runnning concurrent threads

then getting interested in PyGTK and accessing and trying to follow 2
different scripts that use subprocesses and/or threads to allow one to
experiment with creating PyGTK widgets from the command line

and then deciding to dive in and go further with my PyGeo/Povray
interface so that instead of simply exporting constructions to Povray
scene defintion language, and then forcing users to leave PyGeo to
render in povray and then use some kind of viewer to see what it is they
have gotten, I would run povray as a subprocess to render and then
return a rendered image using either Tk native image display facilities
or some combo of Tk and PIL

(like most of what I do with PyGeo I consider myself the primary user,
and this is for me - I want to test the povray export of all my demos
before I release and this was becoming a pain)

and what if there are errors along the way from one of these attempts -
how do I capture and communicate that?

and with the backdrop of having some nagging doubt whether one can truly
become a full fledged Python programmer without *first* being a C
programmer

and faced with distinguishing whether I need, in any case.

popen2
popen3
popen4
execl
execlp
execlpe
execvp
execvpe
fork
spawnv
spawnve
spawnvp
spawnvpe
spawnl
spawnle

all of which are documented with some implicit assumption that one is a
C programmer.

comes the subprocess module, packaged with Python2.4 without much
fanfare 

which seems to go a long way to abstracting all this away in a platform
independent manner 

and seems to transform the process of subprocesses into something
Pythonic, rather than a C-ic relic.

And is some evidence against the accusation that the Python team has
been too focused on core language and not enough on library support.
Something that needed to get done, quietly got done, in any case,
thanks.

See -

http://pyxr.sourceforge.net/PyXR/c/python24/lib/subprocess.py.html

which is a node of the source of the entire Python lib created with
PyXR.  Something else that quietly got done, capable of transforming
one's entire PYTHONPATH into nicely crosslinked HTML, and which has me
for the first time actually reading library code as well as docs as a
way of understanding module functionality.  thanks again.

Art



More information about the Edu-sig mailing list