passing command line arguments
Brian McCann
Brian.McCann at viziant.net
Fri Sep 7 12:47:32 EDT 2007
Hi,
when I run the script show_args2.py
# ./show_args2.py 1 2 3
I get the following error
Traceback (most recent call last):
File "./show_args2.py", line 4, in ?
print 'The arguments of %s are "%s"' %s \
NameError: name 's' is not defined
#####################################
<mailto:brian.mccann at viziant.net>
this is the script
#!/usr/bin/python
import sys, string
print 'The arguments of %s are "%s"' %s \
(sys.argv[0], string.join(sys.argv[1:]))
any help would be greatly appreciated
-Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070907/9db429e2/attachment.html>
More information about the Python-list
mailing list