I'm learning Python for the first time and I use Komodo Edit 8.5 to practice Python.
But I don't know how to run a program in Komodo Edit.
How can I do that?
I'm learning Python for the first time and I use Komodo Edit 8.5 to practice Python.
But I don't know how to run a program in Komodo Edit.
How can I do that?
There is no debugging feature in Komodo Edit but you can just run the current file by creating a Run Command:
%(python) %F
You should now have a new Run Command in your toolbox called 'Run Python file'; when you double-click on it the command should run the current Python script open in the editor and display the output in the Command Output pane.
For more on Run Commands:
http://aspn.activestate.com/ASPN/docs/Komodo/4.2/komodo-doc-run.html#run...
Although the 2014 answer is still a useful indication of what to do, Komodo has moved on. It's now at version 11. Assuming you're using Python 3 here are more detailed steps, for Windows.
Within Komodo, click on the three horizontal bar icon in the upper right corner and select 'Preferences'. Then select 'Python 3'. Komodo will offer you a drop-down menu of the Python 3 interpreters available on your system. Select one.
Within Komodo again, click on the horizontal bar icon again and select 'Run Command'. Enter %(python) %F
, as shown, and select the 'Add to Toolbox' box, so that you can re-use the command.
You should now see this display. Komodo will have executed your code, and it will have added your command to the toolbox. It appears twice in mine because I was writing this!
Press Ctrl + R (Cmd + R on Macs) and enter:
%(python) %F
The first thing you should do is to link the Python3 Komodo option to your install python 3 executable file. Secondly, make sure that the Komodo Interactive Shell point out to Python 3 instead of Python (by default). Finally, create a command:
py "%F"
Note that you can rename it to "Run - Python". Also, make sure that you provide the create command with a key binding mine is Ctrl + Alt + R
© 2022 - 2024 — McMap. All rights reserved.
%(python) -u "%F"
the-u
allows you to use theunbuffered mode
because sometimes you cant see the result in the console, so with this mode you can. – Contrastive