Yajirobe
Yajirobe

Reputation: 115

Sublime text 3 run a python script and stay in interactive mode after (Ubuntu)

I have a custom build system which executes a python script and shows the output in the terminal. I would like to stay in the interactive mode afterwards (be able to access variables). How would I change the JSON code below?

{
    "cmd": ["gnome-terminal -e 'bash -c \"python3 -u $file;read line\"'"],
    "shell": true
}

Upvotes: 0

Views: 499

Answers (1)

André Nasturas
André Nasturas

Reputation: 113

Try adding the python interactive mode option -i to the command : "gnome-terminal -e 'bash -c \"python3 -i -u $file;read line\"'"

Upvotes: 1

Related Questions