makeExe.py

Josiah Carlson jcarlson at nospam.uci.edu
Sun Jan 25 19:02:30 CET 2004


> package = re.split("/",package[len(package) - 1])
> package = re.split(".py",package[len(package) - 1])

You'll find the readability increases when using:

package = re.split("/", package[-1])
package = re.split(".py", package[-1])

Negative indices are your friends.
  - Josiah



More information about the Python-list mailing list