[Pythonmac-SIG] Run Python module directly from Terminal?
Lee Cullens
lee_cullens at mac.com
Tue May 24 03:04:28 CEST 2005
I wanted to run a python module across a file and tried just double
clicking the script, which thanks to Bob's build (I guess) would have
worked fine if I had not used a .py file and had not had an arg.
Anyway it showed me enough to accomplish what I wanted. I did not
want to create a standalone because I edit it for different (usually
one time) purposes and thus usually have only a .py file to start.
So, after changing the first item to python (instead of pythonw) and
including a third item for the arg, this worked:
=============================
Welcome to Darwin!
Chinook ~ 81 $"/usr/local/bin/python" "/Users/Chinook/PythonProjects/
MyUtilities/ConvertFile.py" "/Users/Chinook/TestFiles/AtoB.txt" &&
echo Exit status: $? && exit 1
<process log output>
Exit status: 0
logout
[Process completed]
================================
So what's my problem? Well I know I could reduce the typing with
some aliasing in my .profile file, but I'm wondering if there is not
a simpler/direct way of accomplishing a basic task such as this?
Thanks,
Lee C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050523/bc30f5af/attachment.htm
More information about the Pythonmac-SIG
mailing list