Ask Your Question

How do I set a Launch Configuration to use the -m convention?

asked 2019-11-25 13:06:54 -0600

tinjaw's avatar

updated 2020-01-22 19:31:16 -0600

I want to launch with...

python.exe -u -m mypackage.mymodule

I understand I can add the -m, but how do I get it to use the proper package.module.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2020-01-22 19:30:16 -0600

As of Wing 7.2, you do this with Environment under the Debug/Execute tab in File Properties, or you can set up a Named Entry Point from the Debug menu and select Named Module and enter the module name.

edit flag offensive delete link more

answered 2019-11-26 11:54:06 -0600

You can also locate runpy with at any python prompt:

import runpy
edit flag offensive delete link more


@gadgersteve, I just want to check with you that this continues to be true for virtual environments.


tinjaw's avatar tinjaw  ( 2019-11-27 09:46:34 -0600 )edit

Some quick testing shows that runpy is not copied as a part of the virtual environment for venv nor virtualenv on 2.7 but is on the python path in all of my tests so the above gives the same result both in the virtual environments that I have tested and in normal use.- note that os is copied and gives different results in the venv to normal use so it is working fine!

gadgetsteve's avatar gadgetsteve  ( 2019-11-27 14:16:58 -0600 )edit

answered 2019-11-26 09:26:07 -0600

The -m option is not currently supported. We plan to add support for it soon.

edit flag offensive delete link more


What is the suggested workaround? I ask because I have a large main project that I am using to evaluate Wing Pro against, and it requires the use of -m format.


Let me rephrase that. I know of no other way to run it w/o the -m option. I am open to being schooled.

tinjaw's avatar tinjaw  ( 2019-11-26 11:12:42 -0600 )edit

A workaround is to use in the standard library as the main debug file and specify the module name as the first argument -- so to debug the equivalent of python -m pip, the arguments for would be: pip

To easily find, add import runpy to a file and then use goto definition on runpy.

Wingware Support's avatar Wingware Support  ( 2019-11-26 11:43:32 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-11-25 13:06:54 -0600

Seen: 542 times

Last updated: Jan 22 '20