How to run python code once written?
-
how do a run a python code once I have typed it. I made some ascii art pictures and I am not sure. When I run the code should it be just the code showing or the pictures also. Thank You. I have the python idle software downloaded and installed and notepad ++.
-
I can’t say what your python code should do as there is no info what has been coded but
concerning the execution of code from within python there are several ways to achieve this.-
use the run menu and run function (typically keyboard shortcut F5)
within this dialog you would do something likecmd /K python $(FULL_CURRENT_PATH)
the variable FULL_CURRENT_PATH gets substituted by notepad++ with the full path
of the current opened document. So it is a must that the script has been already saved
before you run it.-
Install the excellent NppExec plugin. It does basically the same as the build in run function
but offers a lot more in addition. Like you can define that not only the script should run but
also some other action should take place. If using the NppExec plugin you do not need
the cmd shell from the previous example as it has its own “shell” so a callpython $(FULL_CURRENT_PATH)
is sufficient.
3)Install python script plugin. As it is not its native functionality you can use it to run
scripts as well. Its main purpose is to interact with notepad++, meaning you can
automatically insert text into your document or reformat it automatically etc…Cheers
Claudia -