How to pass multiple arguments in command line using python
<p>(My Code):</p>

<pre><code>import csv
import re
import string
import sys
import fileinput
import os
import random
import glob
import getopt

def getSymbols(filename):
    f = file(filename)
    while True:
        line = f.readline()
        if len(line) == 0:
            break
        print line, 
    f.close()
if len(sys.argv) &lt; 2:
    print 'No action specified.'
    sys.exit()

    elif:
        print "No option"
    sys.exit()

    else:
        for filename in sys.argv[1]:
            readfile(filename)

    with open(filename) as f:
         for line in f:
             if 'symbols' in line:
                print "Total Number of Symbols:\n",line.strip(' has ');
getSymbols(filename)
</code></pre>

<p>I have a requirement and I am not able to find a solution:</p>

<p>How can I pass multiple file path as arguments in the command line ?
Eg: </p>

<pre><code>test.py C:\test1.txt C:\test2.txt
</code></pre>

<p>I have used the code as mentioned above to pass the file path as an argument and <code>filename</code> is the reference to that argument that I pass and it should print the total number of symbols. Please send me the sample code related to this issue.</p>
