I also try to import win32com ........and it says that there is no module named win32com

I don't mind if it only works on windows.....if there is a way to do it.

Bringing a window in front is tricky in Windows, and look worst in Win7:

MS Documentation for SetForegroundWindow reads as follows:"Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call the FlashWindowEx function to notify the user."

So the only way I found is this, however I cannot put the focus back to ST2:

"Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call the FlashWindowEx function to notify the user."

IIRC the rules are different for subprocesses of the caller of SetForegroundWindow

ie. If you launch a subprocess from sublime, are focused there, and a set_timeout calls you back to sublime it should work ...