Sublime Forum

Open python REPL in new window

#1

Hello all,

I found this tutorial on stack overflow to open an interactive session using the current file. It works, but I was wondering if there was a way to have it generate a new window?
stackoverflow.com/questions/1408 … ime-text-2

Also, when it generates the window on the bottom of the screen, it keeps generating new ones. Is there a way to replace the existing REPL?

Thanks,

0 Likes

#2

Yeah, just create a new window first, then use something like new_window.run_command(‘repl_open’, …).
You can have it replace the previous repl just by iterating through the views and seeing if you want to replace any of them.

0 Likes