Sample Header Ad - 728x90

How can I run the file currently open in the kate editor as a python script?

1 vote
0 answers
2090 views
I am writing Python scripts and using a shebang line to specify the location of the Python interpreter in my system.: #!/usr/bin/env python So, in principle, my system should be able to run the script correctly, using the right interpreter. This should also be true for other scripting languages, such as shell scripts, provided that I give the right path to the interpreter in the shebang line. What I do now to run it is to open a terminal, and type: python /path/to/my/script.py but I am looking for a more efficient way. So, my question is: is there a command, within Kate, which allows me to run the current file as a script? I am trying the command "Run Current Document", under the "Tools" menu, I get a message asking if I really want to run it, but then nothing happens.
Asked by Fabio (535 rep)
May 24, 2023, 09:16 AM
Last activity: May 25, 2023, 12:39 PM