Flag control variable

Gary Herron gary.herron at islandtraining.com
Tue Feb 11 20:26:06 CET 2014

On 02/11/2014 11:06 AM, luke.geelen at gmail.com wrote:
> i found it int(sys.argv[2]) should be sys.argv[2]
> is there a way i can do python ./script.py 3 * 3 instead of python ./script 3 \* 3 ?

That's not really a Python question.  The shell (as it's called) which 
interprets your typed command and runs Python with the rest of the 
command line arguments is in control of this.  If you can find a way to 
tell your shell to not expand '*' characters, or find a shell that does 
not do so, then yes, you can dispense with the back-slash.

Gary Herron

More information about the Python-list mailing list