I am completely new to Python and wanted to try this code from the tutorial:
istrue = 1
if istrue:
print ("be carefull!")
The code itself should be fine, but I can not find any way to execute this code inside the editor [Komodo-Edit](http://www.activestate.com/komodo-edit)
I am used to Visual Studio and QtCreator (experienced C++/Qt developer). I would expect a menu for debugging and a command such as 'start debugging' which should open a console or use a console inside the editor. I would in any case refuse to use a dos console because then the whole idea of using an IDE would be useless.
If other Python IDEs would be more useful (on windows, no costs) I could switch to another one (except for vim/emacs).
The Komodo Run Command feature offers another way to run commands that would otherwise be run on the system command line. This section starts with a simple echo command. Select Tools > Run Command to open the Run Command dialog box. In the Run field, enter echo Hello World .
go to Toolbox -> Add -> New Command... in the top field enter the name 'Run Python file' in the 'Command' field enter this text: %(python) %F. (optional) click on the 'Key Binding' tab and assign a key command to this command.
To run Python scripts with the python command, you need to open a command-line and type in the word python , or python3 if you have both versions, followed by the path to your script, just like this: $ python3 hello.py Hello World! If everything works okay, after you press Enter , you'll see the phrase Hello World!
I used to use Komodo edit, but not anymore as It's more of a text editor than an IDE. I reccomend using Ninja-IDE or Eclipse with PyDev. But if you insist on using Konodo Edit, here's an option: Go here: Toolbox > Add > New Command... in the top field enter the name 'Run Python file' or something else. Then go to the 'command' field and enter this:
%(python) "%F"
Optionally, you could also specify key binding for fast python executing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With