def module_required(fn):
 @wraps(fn)
 def wrapper(self, *args, **kwargs):
  if (not self.current_module):
   print_error("You have to activate any module with 'use' command.")
   return
  return fn(self, *args, **kwargs)
 try:
  name = 'module_required'
  wrapper.__decorators__.append(name)
 except AttributeError:
  wrapper.__decorators__ = [name]
 return wrapper

def module_required ( fn ) : @ wraps ( fn ) def wrapper ( self , * args , ** kwargs ) : if ( not self . current_module ) : print_error ( "You have to activate any module with 'use' command." ) return return fn ( self , * args , ** kwargs ) try : name = 'module_required' wrapper . __decorators__ . append ( name ) except AttributeError : wrapper . __decorators__ = [ name ] return wrapper
checks if module is loaded .