Print Options of optparse

Discussion in 'Python' started by Enchanter, Dec 17, 2009.

  1. Enchanter

    Enchanter Guest

    I am learning Python and uising optparse to handle command-line
    options. But I am not sure who to print the options' content below:

    ......

    options, args = parser.parse_args()
    Enchanter, Dec 17, 2009
    #1
    1. Advertising

  2. On Wed, 16 Dec 2009 23:10:26 -0800, Enchanter wrote:

    > I am learning Python and uising optparse to handle command-line options.
    > But I am not sure who to print the options' content below:
    >
    > .....
    >
    > options, args = parser.parse_args()



    Is there a reason why

    print options


    doesn't do what you want?




    --
    Steven
    Steven D'Aprano, Dec 17, 2009
    #2
    1. Advertising

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. David Goodger

    Re: Iterating over optparse options

    David Goodger, Jun 25, 2003, in forum: Python
    Replies:
    0
    Views:
    983
    David Goodger
    Jun 25, 2003
  2. Gregory (Grisha) Trubetskoy

    Required options in optparse

    Gregory (Grisha) Trubetskoy, Oct 4, 2003, in forum: Python
    Replies:
    0
    Views:
    413
    Gregory (Grisha) Trubetskoy
    Oct 4, 2003
  3. Steven Bethard
    Replies:
    0
    Views:
    387
    Steven Bethard
    May 10, 2006
  4. Rocky Zhou
    Replies:
    3
    Views:
    301
    Steven Bethard
    Mar 18, 2007
  5. Omari Norman

    Re: optparse - required options

    Omari Norman, Aug 23, 2007, in forum: Python
    Replies:
    2
    Views:
    419
    Steve Holden
    Aug 24, 2007
Loading...

Share This Page