def __init__(self, port=0, timeout=3.0, mode='OLD'):
        """
        @port: sikuli java process socket port
        @timeout: Timeout of waiting java process started
        @mode: if set as 'DOC',  will stop java process automatically, 
               if set as 'PYTHON', means library is running out of robot environment
               if set as 'CREATE', it is only for mvn package usage, will create keywords.py file
               if set as 'OLD'(default), sikuli java process will be started when library is inited
               if set as 'NEW', user should use 'start_sikuli_process' to start java process
        """
        self.logger = self._init_logger()
        self.timeout = float(timeout)
        self.port = None
        self.remote = None
        self.mode = mode.upper().strip()
        if mode == 'OLD':
            self.start_sikuli_process(port)
        if mode.upper().strip() == 'DOC':
            self.start_sikuli_process()
            self._stop_thread(4)
        elif mode.upper().strip() == 'PYTHON':
            self.connect_sikuli_process(port)
        elif mode.upper().strip() == 'CREATE':
            self._create_keywords_file()
        elif mode.upper().strip() != 'NEW':
            self._check_robot_running()
def __init__ ( self , port = 0 , timeout = 3.0 , mode = 'OLD' ) : self . logger = self . _init_logger ( ) self . timeout = float ( timeout ) self . port = None self . remote = None self . mode = mode . upper ( ) . strip ( ) if mode == 'OLD' : self . start_sikuli_process ( port ) if mode . upper ( ) . strip ( ) == 'DOC' : self . start_sikuli_process ( ) self . _stop_thread ( 4 ) elif mode . upper ( ) . strip ( ) == 'PYTHON' : self . connect_sikuli_process ( port ) elif mode . upper ( ) . strip ( ) == 'CREATE' : self . _create_keywords_file ( ) elif mode . upper ( ) . strip ( ) != 'NEW' : self . _check_robot_running ( )
@port: sikuli java process socket port
        @timeout: Timeout of waiting java process started
        @mode: if set as 'DOC',  will stop java process automatically, 
               if set as 'PYTHON', means library is running out of robot environment
               if set as 'CREATE', it is only for mvn package usage, will create keywords.py file
               if set as 'OLD'(default), sikuli java process will be started when library is inited
               if set as 'NEW', user should use 'start_sikuli_process' to start java process