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.