passing a shell argument

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Jun 3 15:56:36 CEST 2003


>>>>> "oki" == oki mikito <oki at gk-a.com> writes:

    oki> Hi I wonder if there's a simple way to pass a shell argument
    oki> in a tcsh environment... something like:

    oki> [~/bin] moki% process1 ./*.txt

  import sys
  print sys.argv[1:]

sys.argv is a list of command line arguments.  sys.argv[0] is the name
of the program, and sys.argv[1:] are the rest of the arguments. 

John Hunter





More information about the Python-list mailing list