|
On Thu, Jan 9, 2020 at 12:07 PM Jim Steil <jim@xxxxxxxxxxxxxxx> wrote:
I threw together a little example of how I'd handle the argument parsing
using click. See the notes at the bottom of the script...
-Jim
https://click.palletsprojects.com/en/master/
https://dateutil.readthedocs.io/en/stable/
The above is the entirety of your post (sans bottom-quoting the entire
thread up to that point). It seems you forgot to include a link to
your example script.
Can we infer from your links that your script not only uses `click`
but also `dateutil`? ;)
Mike, at your current stage of familiarity with Python, I would
recommend continuing to focus on the core language and on only those
packages which you need for your immediate task (as far as I'm aware,
that would consist of an Excel workbook writer and a database
connector). There is nothing wrong with how you are grabbing the
command-line arguments (by using `sys.argv` directly), so you can
definitely hold off on learning/using `argparse` and `click`
(mentioned by Jack and Jim, respectively). Those certainly can be
useful, but I think they'd just be distractions for now.
John Y.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.