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. Advertisements

  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. 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. Vincenzo
    Replies:
    1
    Views:
    790
    Raymond DeCampo
    Aug 4, 2005
  2. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    1,029
    GianGuz
    Dec 21, 2004
  3. Cas
    Replies:
    5
    Views:
    1,006
    Kevin Jones
    Aug 28, 2006
  4. Kevin Blount

    page.aspx?option - how to detect "option"

    Kevin Blount, Nov 28, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    799
    =?Utf-8?B?RWVyYWo=?=
    Nov 28, 2006
  5. John

    Regex for <option> ... </option>

    John, Jan 23, 2009, in forum: Perl Misc
    Replies:
    10
    Views:
    449
    Eric Pozharski
    Jan 29, 2009
  6. Mark Kolber
    Replies:
    4
    Views:
    568
  7. Replies:
    7
    Views:
    429
  8. Terry Reedy

    Re: The usage of -m option of python

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