[Tutor] writing to the shell
Erik Price
erikprice@mac.com
Sun, 17 Feb 2002 18:16:13 -0500
Hello, everyone,
I have a quick question:
I wrote a bash shell script that takes a single argument, namely, a
filename. It performs some check to see if the name conforms to a
certain structure (I used shell globbing to do this, but could easily
use Python's regexes, though I don't know how to do that), and if it
matches, it temporarily changes the name of the file to something else
and then executes the scp command with the new name as the argument to
scp.
As a learning exercise, i was thinking of turning this into a Python
script. I don't want a how-to on actually writing the code (esp since
it's already written), but how can I access my shell from a Python
script?
Thanks for the answer to this question, it will be my first "functional"
python script.
Erik