<s> from __future__ import print_function <EOL> from spinoff . actor . props import Props <EOL> class Actor ( object ) : <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def using ( cls , * args , ** kwargs ) : <EOL> return Props ( cls , * args , ** kwargs ) <EOL> __cell = None <EOL> args , kwargs = ( ) , { } <EOL> sender = None <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> self . args , self . kwargs = args , kwargs <EOL> receive = run = None <EOL> def spawn ( self , factory , name = None ) : <EOL> return self . __cell . spawn_actor ( factory , name ) <EOL> def get ( self , * patterns , ** kwargs ) : <EOL> return self . __cell . get ( * patterns , ** kwargs ) <EOL> def get_nowait ( self , * patterns , ** kwargs ) : <EOL> return self . __cell . get_nowait ( * patterns , ** kwargs ) <EOL> def flush ( self ) : <EOL> self . __cell . flush ( ) <EOL> @ property <EOL> def children ( self ) : <EOL> return self . __cell . children <EOL> def watch ( self , actor , * actors , ** kwargs ) : <EOL> return self . __cell . watch ( actor , * actors , ** kwargs ) <EOL> def unwatch ( self , actor , * actors ) : <EOL> self . __cell . unwatch ( actor , * actors ) <EOL> @ property <EOL> def ref ( self ) : <EOL> return self . __cell . ref <EOL> @ property <EOL> def root ( self ) : <EOL> return self . __cell . root <EOL> @ property <EOL> def node ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . root . node <EOL> def _set_cell ( self , cell ) : <EOL> self . __cell = cell <EOL> def send ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . ref . send ( * args , ** kwargs ) <EOL> def send_later ( self , * args , ** kwargs ) : <EOL> self . ref . send_later ( * args , ** kwargs ) <EOL> def __lshift__ ( self , message ) : <EOL> self . ref . send ( message ) <EOL> return self <EOL> def stop ( self ) : <EOL> self . ref . stop ( ) <EOL> def reply ( self , msg ) : <EOL> self . sender << msg <EOL> def __eq__ ( self , other ) : <EOL> return other is self or self . ref == other <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" % ( self . ref . uri . path , ) </s>
