Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Python in komodo

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).

like image 537
Matthias Pospiech Avatar asked Jan 05 '13 17:01

Matthias Pospiech


People also ask

How do I run a program on Komodo?

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 .

How do I use Komodo Edit in python?

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.

How do I run my .PY file?

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!


1 Answers

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.

like image 142
null Avatar answered Sep 29 '22 07:09

null