simple question about directories

From: John A Meinel [mailto:john@johnmeinel.com]
Charles Hartman wrote:
> basedir = os.sep.join(sys.argv[0].split('/')[:-1])
Why all the split, etc. Why not use your python given right, and call

os.path.basename() or os.path.dirname()

Or even os.path.split() .