The problem that code solves is finding the name of the invoked command and
getting rid of the Windows .exe extension. I'd write it a bit differently:

  from os.path import basename, splitext
  ...
  progname = splitext(basename(sys.argv[0]))[0]

  (or, at length)
  progfile = basename(sys.argv[0])
  progname = splitext(progfile)[0]

On the other hand, it probably ought to be encapsulated somewhere in a
function or class, so that one does not have to look at it too much. :-)

The binary EOF thing was a problem of the old FAT filesystem, which
operated in blocks, and EOF was an actual character in the file. It is
still present in NTFS, then? Say, what?
_______________________________________________
Radiance-dev mailing list
Radiance-dev@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Reply via email to