-
-
Save zeffii/7631693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
import subprocess | |
import threading | |
class OpenNotepadCommand(sublime_plugin.TextCommand): | |
def run(self, edit, filename=None): | |
th = NotepadThread(filename) | |
th.start() | |
class NotepadThread(threading.Thread): | |
def __init__(self, filename=None): | |
self.filename = filename | |
threading.Thread.__init__(self) | |
def run(self): | |
if self.filename is not None: | |
subprocess.call("notepad.exe %s" % self.filename) | |
else: | |
subprocess.call("notepad.exe") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
threading