Ask Your Question

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

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

tinjaw gravatar image

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

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 -0500

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 -0500

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 gravatar image tinjaw  ( 2019-11-27 09:46:34 -0500 )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 gravatar image gadgetsteve  ( 2019-11-27 14:16:58 -0500 )edit

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

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 gravatar image tinjaw  ( 2019-11-26 11:12:42 -0500 )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 gravatar image Wingware Support  ( 2019-11-26 11:43:32 -0500 )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 -0500

Seen: 177 times

Last updated: Jan 22 '20