1. Delete "Def" line. You don't need it. 2. Use Edit menu of Spyder to Unindent all the lines. 3. import the system library sys 4. sys.argv is a list of the filenames following the program name.