Terminal Launches python script in Notepad upon execution
Answered
When I launch a python script from the PyCharm Embedded Terminal window it launches the python script in a notepad editor versus launching the script.
All of my .py files are associated to python and I am able to launch the script without issue from the Run menu option.
Any idea why I cannot launch the script directly from the Terminal?
Please sign in to leave a comment.
Hi Wowens,
Please attach a screenshot of Settings/Preferences | Tools | Terminal and a screenshot showing the problem.
Here are the items you requested.
Like I said, when I go to launch the script within the embedded terminal it launches the file within notepad instead of running the script
Thanks
Bill
Does it also happen if you run the script in the command line (outside of PyCharm) using the same interpreter?
Yes it does.. Launches the script file in notepad.
If I enter "python" prior to the script path and arguments from the same interpreter it will launch.
It means that the problem is not related to PyCharm and you should search the web for a solution. Quick search has led me to https://stackoverflow.com/questions/15121714/how-do-i-get-a-python-program-to-run-instead-of-opening-in-notepad and https://stackoverflow.com/questions/4316883/py-files-opens-up-in-a-text-editor-when-run-from-cmd?lq=1
Yep file association was the culprit. I re-associated the file to use python and it worked
The python icon did show as the default program for launching the file as I mentioned initially...
Thanks for the help, sorry for putting you through that...