On Jan 15, 4:34 pm, asit <lipu...@gmail.com> wrote: > apppath = sys.argv[0].split("/") > appname = apppath[len(apppath)-1]
I'd replace these two lines with the following: import os.path # at the top of the file, of course appname = os.path.basename(sys.argv[0]) Also note that you can use negative indices in lists, with -1 being the last element, -2 the last but one etc. -- http://mail.python.org/mailman/listinfo/python-list