#! /usr/bin/env python import ServerClass import subprocess while 1: # try connect to website server = ServerClass.ServerHandler(34600) tried = server.openSocket() test = server.receiveData(2) if test == 'START APP': print 'start' #subprocess.Popen(args=['gnome-terminal','--command= python gsmselftest.py']) script = 'gsmselftest.py' subprocess.Popen(['python',script], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) server.closeConnection() del server