cherokee / webserver

Cherokee Web Server
GNU General Public License v2.0
562 stars 105 forks source link

create better command line argument parser for cherokee-tweak #1093

Open skinkie opened 10 years ago

danielniccoli commented 10 years ago

Without really looking into it, I believe docopt could be helpful.

danielniccoli commented 10 years ago

@skinkie, please have a look at https://github.com/Borkason/webserver/commit/6226962fe66b12df990332aa93f20612ad7c1195 and do some testing. I currently have no cherokee server running on which I can verify that everything works as intended.

skinkie commented 10 years ago

Thanks! Will do.

danielniccoli commented 9 years ago

@skinkie, I just had a quick second look at that commit. I believe that I accidentally added cherokee/__init__.py. When you are reviewing this code, please delete the file first and tell me if it breaks anything. If not, I will do a clean commit and send a pull request to cherokee/webserver.

Thank you.

danielniccoli commented 9 years ago

Slight changes: Python module docopt is a requirement to use cherokee-tweak. If you run it without, a warning will tell you to install it (via pip).

skinkie commented 9 years ago

My main problem is that docopt isn't part of the base python distribution. That is a showstopper for me.

danielniccoli commented 9 years ago

Yeah, I worried about that. When we ship it with docopt, where would you like to place it?

skinkie commented 9 years ago

Whats wrong with https://docs.python.org/2/library/optparse.html ?

binBASH commented 7 years ago

Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.

=> https://docs.python.org/2/library/argparse.html#module-argparse