Access to raw command line?

Donn Cave donn at u.washington.edu
Thu Apr 26 18:45:35 CEST 2007


In article <1177571070.229968.155710 at t39g2000prd.googlegroups.com>,
 Pieter Edelman <p.edelman at gmail.com> wrote:

> One possible way to work around this is to get the raw command line
> and do the shell expansions ourselves from within Python. Ignoring the
> question of whether it is worth the trouble, does anybody know if it
> is possible to obtain the raw (unexpanded) command line?

If you're on VMS (well, you didn't say), you're in luck.

The UNIX shell has already expanded the file globbing by the
time your program starts up, but VMS leaves it to the application,
with the help of a handy RMS$ function or two so it gets done in
a consistent way.  This allows the command line interface to
interact with the user in a little more transparent way, since
the input seen by the program is congruent with what the user
typed in.  E.g., "rename *.jpeg *.jpg" is trivial on VMS,
impossible on UNIX.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list