Darren, Thanks ________________________________
From: [EMAIL PROTECTED] on behalf of darren kirby Sent: Fri 9/7/2007 1:58 PM To: python-list@python.org Subject: Re: passing command line arguments quoth the Brian McCann: > 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:[EMAIL PROTECTED]> > 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:])) You don't want the 's' on the last format operator. Try: print 'The arguments of %s are "%s"' % \ (sys.argv[0], string.join(sys.argv[1:])) > any help would be greatly appreciated > > -Brian -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 -- http://mail.python.org/mailman/listinfo/python-list
-- http://mail.python.org/mailman/listinfo/python-list