getopt and Non-Unixes?

Darrell Darrell at p98.f112.n480.z2.fidonet.org
Thu Jul 1 05:38:17 EDT 1999


From: "Darrell" <news at dorb.com>

You end up using -v -d -f or -vdf this last one will throw Dos people for a
loop.
I supply the help message if the command line isn't understood.

def runIt():
 try:
  opts, args = getopt.getopt(sys.argv[1:], "l:hdpf:o:")
 except getopt.error, msg:
  sys.stderr.write("Error: %s\n" % str(msg))
  print help_str
  sys.exit(1)


--
--Darrell
Gerrit Holl <gerrit.holl at pobox.com> wrote in message
news:19990701174416.A27152 at optiplex.palga.uucp...
> Hello all,
>
> I was wondering how getopt worked on dos/windows (and other operating
systems).
> While in dos, the default way to handle arguments is "/v /d /f" (isn't
it?).
>
> I don't have access to any micro$oft machine (it doesn't make me
unhappy...),
> but I just wanted to know how my program works on Dos/windows/macintosch
and
> other non-Unix systems.
>
> regards,
>
> Gerrit.
>
>





More information about the Python-list mailing list