python: IndexError: list index out of range (file = sys.argv[1]) -


if __name__ == "__main__":     file = sys.argv[1]     f = fst("q0")     #f.addstate("1", true)     #f.addstate("2", true)     #f.addstate("3", true) 

in line file = sys.argv[1] getting error. can please me out.

the sys.argv list populated when command line arguments script present. sys.argv[0] name of script running. sys.argv[1] first command line argument passed script. need call script like:

python script_name first_arg 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -