How does one make argparse print usage when no options are providedon the command line?

Discussion in 'Python' started by rh, Dec 5, 2012.

  1. rh

    rh Guest

    I have argparse working with one exception. I wanted the program to print out
    usage when no command line options are given. But I only came across
    other examples where people didn't use argparse but instead printed out
    a separate usage statement. So they used argparse for everything but the
    case where no command line args are given.
     
    rh, Dec 5, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Bethard
    Replies:
    1
    Views:
    367
    Steven Bethard
    Oct 11, 2006
  2. Steven Bethard
    Replies:
    0
    Views:
    358
    Steven Bethard
    Oct 24, 2006
  3. Steven Bethard
    Replies:
    0
    Views:
    348
    Steven Bethard
    Dec 5, 2006
  4. Steven Bethard
    Replies:
    0
    Views:
    340
    Steven Bethard
    Jan 5, 2007
  5. Steven Bethard
    Replies:
    0
    Views:
    393
    Steven Bethard
    Jan 17, 2007
  6. Steven Bethard
    Replies:
    0
    Views:
    403
    Steven Bethard
    Feb 24, 2007
  7. Steven Bethard
    Replies:
    0
    Views:
    284
    Steven Bethard
    Mar 25, 2007
  8. Steven Bethard
    Replies:
    0
    Views:
    256
    Steven Bethard
    May 27, 2007
Loading...