Mailing List Archive

getopt and Non-Unixes?
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.
getopt and Non-Unixes? [ In reply to ]
From: "Darrell" <news@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@pobox.com> wrote in message
news:19990701174416.A27152@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.
>
>
getopt and Non-Unixes? [ In reply to ]
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@pobox.com> wrote in message
news:19990701174416.A27152@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.
>
>
getopt and Non-Unixes? [ In reply to ]
From: Gerrit Holl <gerrit.holl@pobox.com>

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.