How to change command line when running a script with the green run-triangle

Answered

Hello everybody,

I have the same problem as this guy here: http://stackoverflow.com/questions/24622041/python-importing-a-module-from-a-parallel-directory

In short, I would like to start my scripts not as python test/tests.py but as python -m test.tests

That's not a problem from the console, but how can I get the same behavior when I start/debug/profile a script from the GUI / file context menu with the "green triangle"?

Best regards,

Michael

1 comment
Comment actions Permalink

Hi Michael! When you run script from the context menu, PyCharm generates a new run configuration. After that you can go to Run | Edit configurations, select your run configuration and provide interpreter option "-m". Does it help?

0

Please sign in to leave a comment.