More effective way of passing several arguments to script?
<p>My command line script takes several arguments including strings, ints, floats and lists, and it is becoming a bit tricky to do the call with all arguments:</p>

<pre><code>python myscript.py arg1 arg2 arg3 ... argN
</code></pre>

<p>To avoid having to write all arguments in the command line I have created a text file with all arguments which I simply read line by line to collect arguments. This is working fine, but is this the best practice for doing this? Are there a more effective way?</p>

<p>You can use <code>argpase</code> module. Refer to the following links :)</p>

<p><a href="https://pymotw.com/2/argparse" rel="nofollow">https://pymotw.com/2/argparse</a></p>

<p><a href="http://stackoverflow.com/questions/7427101/dead-simple-argparse-example-wanted-1-argument-3-results">Dead simple argparse example wanted: 1 argument, 3 results</a></p>

python arguments parameter-passing