def send_args_to_spyder(args):
 port = CONF.get('main', 'open_files_port')
 for _x in range(200):
  try:
   for arg in args:
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
    client.connect(('127.0.0.1', port))
    if is_unicode(arg):
     arg = arg.encode('utf-8')
    client.send(osp.abspath(arg))
    client.close()
  except socket.error:
   time.sleep(0.25)
   continue
  break

def send_args_to_spyder ( args ) : port = CONF . get ( 'main' , 'open_files_port' ) for _x in range ( 200 ) : try : for arg in args : client = socket . socket ( socket . AF_INET , socket . SOCK_STREAM , socket . IPPROTO_TCP ) client . connect ( ( '127.0.0.1' , port ) ) if is_unicode ( arg ) : arg = arg . encode ( 'utf-8' ) client . send ( osp . abspath ( arg ) ) client . close ( ) except socket . error : time . sleep ( 0.25 ) continue break
simple socket client used to send the args passed to the spyder executable to an already running instance .