A Simple question about a slice of a string.
Jay R. Wren
jrwren at ice.acs.oakland.edu
Fri Jun 2 17:12:29 EDT 2000
More information about the Python-list mailing list
Fri Jun 2 17:12:29 EDT 2000
- Previous message (by thread): A Simple question about a slice of a string.
- Next message (by thread): A Simple question about a slice of a string.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm attempting to accomplish grabbing the last 6 characters of sys.argv[0] so that I can compare it to another string. If 'myprog' is called as /usr/local/bin/myprog. It could be called from any path, as long as the 'myprog' portion is there, certain things will execute.(this is used as a symlink) myprogname = sys.argv[0][ len(sys.argv[0])-10:len(sys.argv[0]) it works like this, but I think there is a better, more proper way of doing it. can someone let me know. Thanks. -Jay
- Previous message (by thread): A Simple question about a slice of a string.
- Next message (by thread): A Simple question about a slice of a string.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list