def writes_bytecode_files(fxn):
 if sys.dont_write_bytecode:
  return (lambda *args, **kwargs: None)
 @functools.wraps(fxn)
 def wrapper(*args, **kwargs):
  original = sys.dont_write_bytecode
  sys.dont_write_bytecode = False
  try:
   to_return = fxn(*args, **kwargs)
  finally:
   sys.dont_write_bytecode = original
  return to_return
 return wrapper

def writes_bytecode_files ( fxn ) : if sys . dont_write_bytecode : return ( lambda * args , ** kwargs : None ) @ functools . wraps ( fxn ) def wrapper ( * args , ** kwargs ) : original = sys . dont_write_bytecode sys . dont_write_bytecode = False try : to_return = fxn ( * args , ** kwargs ) finally : sys . dont_write_bytecode = original return to_return return wrapper
decorator to protect sys .