#NEWLINE# def _osx_focus( self ) : #NEWLINE# #INDENT# name = 'Sublime Text' #NEWLINE# if ( int ( sublime . version ( ) ) < 3000 ) : #NEWLINE# #INDENT# name = 'Sublime Text 2' #NEWLINE# #UNINDENT# cmd = ( '\n            tell application "System Events"\n                activate application "Dock"\n                delay 1/60\n                activate application "%s"\n            end tell' % name ) #NEWLINE# Popen ( [ '/usr/bin/osascript' , '-e' , name ] , stdout = PIPE , stderr = PIPE )