On 27/01/2023 21:31, Ivan "Rambius" Ivanov wrote:
Hello,
I am developing a script that accepts a time zone as an option. The
time zone can be any from pytz.all_timezones. I have
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-z", "--zone", choices=pytz.all_timezon
On 1/27/2023 4:53 PM, Ivan "Rambius" Ivanov wrote:
Hello Cameron,
On Fri, Jan 27, 2023 at 4:45 PM Cameron Simpson wrote:
On 27Jan2023 15:31, Ivan "Rambius" Ivanov wrote:
I am developing a script that accepts a time zone as an option. The
time zone can be any from pytz.all_timezones. I have
Hello Cameron,
On Fri, Jan 27, 2023 at 4:45 PM Cameron Simpson wrote:
>
> On 27Jan2023 15:31, Ivan "Rambius" Ivanov
> wrote:
> >I am developing a script that accepts a time zone as an option. The
> >time zone can be any from pytz.all_timezones. I have
> >
> >def main():
> >parser = argparse
On 27Jan2023 15:31, Ivan "Rambius" Ivanov wrote:
I am developing a script that accepts a time zone as an option. The
time zone can be any from pytz.all_timezones. I have
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-z", "--zone", choices=pytz.all_timezones)
[...]
> print(“Invalid timezone”,file=sys.stderr)
>
This is what I use now. I still wonder if I can mold HelpFormatter to
do what I want it to do.
> …
>
>
>
>
> From: Python-list on
> behalf of Ivan "Rambius" Ivanov
> Date: Frida
van "Rambius" Ivanov
Date: Friday, January 27, 2023 at 3:33 PM
To: Python
Subject: Custom help format for a choice argparse argument
*** Attention: This is an external email. Use caution responding, opening
attachments or clicking on links. ***
Hello,
I am developing a script that ac
Hello,
I am developing a script that accepts a time zone as an option. The
time zone can be any from pytz.all_timezones. I have
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-z", "--zone", choices=pytz.all_timezones)
args = parser.parse_args()
print(args)