Python Forum

Full Version: Adding a parameter/argument to a script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(Jan-29-2018, 12:32 AM)jehoshua Wrote: [ -> ]..short and simple
I don't think you need the type=argparse.FileType('br') parameter because you are only interested in the file's name. If you remove it, you can write directly AUDIO_FILE = args.filename
(Jan-29-2018, 06:53 AM)Gribouillis Wrote: [ -> ]I don't think you need the type=argparse.FileType('br') parameter because you are only interested in the file's name. If you remove it, you can write directly AUDIO_FILE = args.filename

Thanks, that worked fine. :)
Pages: 1 2