On 16 Mai 2006, [EMAIL PROTECTED] wrote:
> Is there a way to leverage optionparser so it can accept input from both
> command line and a configuration file?
>
> Current code block is:
>
> #
> # Parse command line options and automatically build
> # help/usage display
> #
> pars
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Kent,
If I understood correctly, you meant something like this?
#
# Parse command line options and automatically build help/usage
# display
#
if len(sys.argv) == 2:
infile= open(sys.argv[1],"rb").read()
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Everyone,
I have a program that I'd would like to enhance flexibility in calling.
Is there a way to leverage optionparser so it can accept input from both
command line and a configuration file?
Current code block is:
#
# Parse command li