<s> import config <EOL> import socket <EOL> import fply . cli <EOL> class FPLY ( fply . cli . FPLY_repl ) : <EOL> def __init__ ( self ) : <EOL> self . conn = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <EOL> self . conn . connect ( ( config . fplyServer , config . fplyServerPort ) ) <EOL> def __del__ ( self ) : <EOL> self . conn . close ( ) <EOL> def send ( self , data ) : <EOL> self . conn . sendall ( data ) <EOL> def read ( self , length ) : <EOL> return self . conn . recv ( length ) <EOL> def available ( ) : <EOL> return config . fplyServer is not None </s>
