is it bad convention to call sys.argv from somewhere besides main function in python
<p>I am writing a script and I have a function, call it <code>f()</code>, that needs one of the command line arguments (a filename it needs to open). However, <code>f()</code> is not called directly in the main function. </p>

<p>I was wondering if it was bad coding convention to call <code>sys.argv[1]</code> straight from <code>f()</code>? If I don't I would have to pass it as an argument to all of the functions that eventually call <code>f()</code>. </p>
