when i execute my program without an argument i receive, > > > infile = sys.argv[1] > > IndexError: list index out of range > > is there a way that i could suppress this and add my own error code
The direct way to handle this is to check the length of sys.argv first. sys.argv is a list, so you can ask the list for its length. Do you know how to do that? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor