The usage of -m option of python

Discussion in 'Python' started by Peng Yu, Mar 18, 2013.

  1. Peng Yu

    Peng Yu Guest

    Hi,

    I don't quite understand how -m option is used. And it is difficult to
    search for -m in google. Could anybody provide me with an example on
    how to use this option? Thanks!

    -m module-name
    Searches sys.path for the named module and runs the
    corresponding .py file as a script.

    --
    Regards,
    Peng
     
    Peng Yu, Mar 18, 2013
    #1
    1. Advertising

  2. Peng Yu

    Tom P Guest

    On 03/18/2013 10:17 PM, Peng Yu wrote:
    > Hi,
    >
    > I don't quite understand how -m option is used. And it is difficult to
    > search for -m in google. Could anybody provide me with an example on
    > how to use this option? Thanks!
    >
    > -m module-name
    > Searches sys.path for the named module and runs the
    > corresponding .py file as a script.
    >


    The most practical use I know is to run the debug program..
    python -mpdb yourprogramm.py arguments..
     
    Tom P, Mar 27, 2013
    #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. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    724
    GianGuz
    Dec 21, 2004
  2. Chris Angelico

    Re: The usage of -m option of python

    Chris Angelico, Mar 18, 2013, in forum: Python
    Replies:
    0
    Views:
    125
    Chris Angelico
    Mar 18, 2013
  3. Modulok
    Replies:
    0
    Views:
    138
    Modulok
    Mar 18, 2013
  4. Terry Reedy

    Re: The usage of -m option of python

    Terry Reedy, Mar 19, 2013, in forum: Python
    Replies:
    2
    Views:
    145
    Terry Jan Reedy
    Apr 8, 2013
  5. Terry Reedy

    Re: The usage of -m option of python

    Terry Reedy, Mar 27, 2013, in forum: Python
    Replies:
    0
    Views:
    129
    Terry Reedy
    Mar 27, 2013
Loading...

Share This Page