drphilmarshall / pappy

Probability distribution Amplification and Plotting in Python
8 stars 10 forks source link

Argument parsing #7

Open lmoustakas opened 11 years ago

lmoustakas commented 11 years ago

I have had really good success using argparse for flexible command line parsing, which will allow for arguments to be passed pretty painlessly from a %run command within ipython, from a terminal command line, or with the routine as an executable (as long as you have the usual #!/usr/bin/env python line in the routine).

(These are edits that I'm planning on doing on my clone of this project, unless you beat me to it).

drphilmarshall commented 11 years ago

Excellent - I was just thinking the other day that I should switch to argparse. This is a pull request I would love to receive! Thanks Leonidas :-)

On Wed, Feb 20, 2013 at 12:00 AM, Leonidas Moustakas < notifications@github.com> wrote:

I have had really good success using argparse for flexible command line parsing, which will allow for arguments to be passed pretty painlessly from a %run command within ipython, from a terminal command line, or with the routine as an executable (as long as you have the usual #!/usr/bin/env python line in the routine).

(These are edits that I'm planning on doing on my clone of this project, unless you beat me to it).

— Reply to this email directly or view it on GitHubhttps://github.com/drphilmarshall/pappy/issues/7.

dfm commented 11 years ago

Another nice option is docopt. It's my current favourite! It's nice because it forces you to always keep the documentation up to date.

drphilmarshall commented 11 years ago

Well, I certainly approve of that.

On Wed, Feb 20, 2013 at 1:36 PM, Dan Foreman-Mackey < notifications@github.com> wrote:

Another nice option is docopt http://docopt.org/. It's my current favourite! It's nice because it forces you to always keep the documentation up to date.

— Reply to this email directly or view it on GitHubhttps://github.com/drphilmarshall/pappy/issues/7#issuecomment-13831787.