#NEWLINE# def fork_gocode( self ) : #NEWLINE# #INDENT# print ( 'fork_gocode' ) #NEWLINE# kill_gocode ( ) #NEWLINE# outputView = get_output_view ( sublime . active_window ( ) ) #NEWLINE# env = getenv ( ) #NEWLINE# try : #NEWLINE# #INDENT# addr = get_setting ( 'gocode_address' , '-addr=localhost:37777' ) #NEWLINE# debug = get_setting ( 'gocode_debug' , 'false' ) #NEWLINE# self . p = openProcess ( [ 'gocode' , '-sock=tcp' , addr , '-s=true' , ( '-debug=%s' % debug ) ] , env = env , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# t = threading . Thread ( target = log_output , args = ( self . p . stdout , outputView ) ) #NEWLINE# t . daemon = True #NEWLINE# t . start ( ) #NEWLINE# t = threading . Thread ( target = log_output , args = ( debug . p . stderr , outputView ) ) #NEWLINE# t . daemon = True #NEWLINE# t . start ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# outputView . run_command ( 'go_mode_output_insert' , { #NEWLINE# #INDENT# 'text' : ( 'cannot fork gocode\n%s' % e ) , #NEWLINE# #UNINDENT# } )