How to run a script in interactive shell in Komodo Ide 10

I am taking a class that uses spyder. In the class they use runfile to execute a script in their shell. I believe that command is unique to spyder andit doesn’t work in Komodo. Is there a way to run a script that is saved on a flash drive from within the interactive shell? I can run the script in the “normal” ide section but want to run in interactive shell.

Komodo does not have an interactive shell. The closest you can get right now is this addon:

http://komodoide.com/packages/addons/terminal/

I am confused. Under Tools there is a dropdown labeled Interactive Shell. I have used it to do simple commands immediately shuch as print(‘hello’) and it returns Hello. That’s where I’m trying to execute the python script

The terminology is a bit confusing I’m afraid. This interactive shell refers specifically to the interactive shell for the language, it should really be named eg. “Python REPL”.

More accurate would be for me to say we do not support an interactive shell for your system, just for certain languages.

I remain confused. How come a python command such as print(‘hello’) returns hello ---- just like an interactive shell
AND
can I execute a python3 script from that tools/interactive shell location?

You can run commands in Komodo just fine. But it is not “interactive”. You run a command and Komodo shows the output. It does not support chaining previous executions or interacting with shell prompts or stuff like that.

So is the answer to my question ----can I execute a python3 script from the tools/interactive shell location—
no?

I think we’re getting hung up on confusing terminology. So I’ll try to answer as best I can and you can let me know whether that covers your use-case.

You can execute a Python script in several ways:

  • Using Debug > Go (IDE only)
  • Using Tools > Run Command
  • By creating a “Command” tool in your Toolbox (right panel)
  • By typing your command (eg. python foo.py) in the Command Output widget (bottom panel)

There are more ways, but these are the easiest and most common methods.

thanks