Python Forum
Not able to figure out what is wrong with argparse
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not able to figure out what is wrong with argparse
#11
Hi

Thanks. The call of the script is coming from a tool which is enforcing the below format as agument. Look at the comma separations between keys and values and quotes. I do not have a way to change that argument passing done by the caller Application

Quote:'--host', 'ccccccc602', '--service', 'SN-WIN-osservices', '--priority', 'WARNING', '--output', 'WARNING: , delayed (BITS=stopped (delayed))', '--os', 'Windows Server 2016 Standard', '--operator', 'operator_os', '--notificationtype', 'PROBLEM', '--notification_default', 'operator_os', '--hostappname', 'TEC-Server', '--Environment', 'PROD', '--eventtime', '2022-03-15 15:13:26 +0100', '--division', 'Tec', '--operatoros', 'G_W_RUN', '--operatormw', 'G_W_RUN', '--appname', 'TEC-Server', '--Info', 'Prueft den Status wichtiger Windows-Services auf Windows-Hosts', '--IPAddress', '99.99.99.99'
Reply


Messages In This Thread
RE: Not able to figure out what is wrong with argparse - by radioactive9 - Mar-15-2022, 04:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug argparse io issue pyDream 8 840 Apr-02-2024, 12:42 PM
Last Post: pyDream
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,698 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  argparse --help in one line. Denial 1 2,041 Sep-20-2020, 03:38 PM
Last Post: deanhystad
  Argparse error when inputting values tqader 2 2,950 Sep-11-2020, 07:42 PM
Last Post: buran
  Why this pycharm warning for argparse formatter_class value? pjfarley3 2 2,179 Sep-09-2020, 05:23 AM
Last Post: pjfarley3
  Can argparse support undocumented options? pjfarley3 3 2,305 Aug-14-2020, 06:13 AM
Last Post: pjfarley3
  In ArgParse, can two compatible formatter_class values be used? pjfarley3 2 2,670 Jul-31-2020, 02:01 PM
Last Post: pjfarley3
  python gives wrong string length and wrong character thienson30 2 3,071 Oct-15-2019, 08:54 PM
Last Post: Gribouillis
  Why am I getting KeyError 'file' when using argparse? Mike Ru 1 3,125 Jun-09-2019, 04:48 PM
Last Post: metulburr
  How can I get some arguments using argparse? Mike Ru 0 1,914 Jun-05-2019, 12:57 PM
Last Post: Mike Ru

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020