<s> """<STR_LIT>""" <EOL> class ScriptingMixin ( object ) : <EOL> """<STR_LIT>""" <EOL> def eval ( self , script , keys = None , args = None ) : <EOL> """<STR_LIT>""" <EOL> if not keys : <EOL> keys = [ ] <EOL> if not args : <EOL> args = [ ] <EOL> return self . _execute ( [ b'<STR_LIT>' , script , str ( len ( keys ) ) ] + keys + args ) <EOL> def evalsha ( self , sha1 , keys = None , args = None ) : <EOL> """<STR_LIT>""" <EOL> if not keys : <EOL> keys = [ ] <EOL> if not args : <EOL> args = [ ] <EOL> return self . _execute ( [ b'<STR_LIT>' , sha1 , str ( len ( keys ) ) ] + keys + args ) <EOL> def script_exists ( self , * hashes ) : <EOL> """<STR_LIT>""" <EOL> return self . _execute ( [ b'<STR_LIT>' , b'<STR_LIT>' ] + list ( hashes ) ) <EOL> def script_flush ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _execute ( [ b'<STR_LIT>' , b'<STR_LIT>' ] , b'<STR_LIT:OK>' ) <EOL> def script_kill ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _execute ( [ b'<STR_LIT>' , b'<STR_LIT>' ] , b'<STR_LIT:OK>' ) <EOL> def script_load ( self , script ) : <EOL> """<STR_LIT>""" <EOL> return self . _execute ( [ b'<STR_LIT>' , b'<STR_LIT>' , script ] ) </s>
