def evaluateCode(code, variables=None):
 try:
  exec code in variables
 except KeyboardInterrupt:
  raise
 except Exception as ex:
  errMsg = ("an error occurred while evaluating provided code ('%s') " % getSafeExString(ex))
  raise SqlmapGenericException(errMsg)

def evaluateCode ( code , variables = None ) : try : exec code in variables except KeyboardInterrupt : raise except Exception as ex : errMsg = ( "an error occurred while evaluating provided code ('%s') " % getSafeExString ( ex ) ) raise SqlmapGenericException ( errMsg )
executes given python code given in a string form .