<s> from __future__ import ( absolute_import , division , generators , nested_scopes , print_function , <EOL> unicode_literals , with_statement ) <EOL> from abc import abstractmethod <EOL> class ProcessHandler ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abstractmethod <EOL> def wait ( self ) : <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def kill ( self ) : <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def terminate ( self ) : <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def poll ( self ) : <EOL> raise NotImplementedError <EOL> class SubprocessProcessHandler ( ProcessHandler ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , process ) : <EOL> self . _process = process <EOL> def wait ( self ) : <EOL> return self . _process . wait ( ) <EOL> def kill ( self ) : <EOL> return self . _process . kill ( ) <EOL> def terminate ( self ) : <EOL> return self . _process . terminate ( ) <EOL> def poll ( self ) : <EOL> return self . _process . poll ( ) </s>
