4 ms·
I cringe everytime I look at that code block. I eventually want to put that code into a loop. That will probably come at the same time as relative path support
by zelon88 8y ago
I cringe everytime I look at that code block.
I eventually want to put that code into a loop. That will probably come at the same time as relative path support.
Just know that I'm not proud of argument handling in its current form and improvements are on my radar.
- benj111 8y agoYes I thought it was an interesting code block :) Good on you for releasing it though. I would seriously look at using a library rather than rolling your own. Sorting all the edge cases is a pain, they can automate help messages etc, gnu style long options etc. Unless of course you want to delve into the weeds of option parsing.
- WorldMaker 8y agoSince Python 3.2 argparse has been in the Python Standard Library: https://docs.python.org/3/library/argparse.html https://docs.python.org/3/library/argparse.html