getopt and Non-Unixes?
Darrell
news at dorb.com
Thu Jul 1 13:38:17 EDT 1999
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