Good day everyone
I’m making a sublime text plugin, it opens a separate application via subprocess popen and send the output back to sublime.
Everything works as expected, but it’s blocking the sublime text window while it’s open, is there I can launch the separate exe as non-blocking?
I did try using “sublime.set_timeout_async”, which launched the app and didn’t block sublime, but it didn’t look like I could capture the output, and anytime I executed something, or closed my app, it would auotmatically repoen
I have something like this:
output= sublime.set_timeout_async(lambda: self.run_command_line([arg1,arg2]),0)
def run_command_line(self,args):
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
out= proc.communicate()[0].decode(‘utf-8’)
return out
Basically, I’d like to launch my exe (as a text or window command), and then leave it open, select text, press a button in my separate application, it sends information back, replaces my current text, and keep that process going till I close the app