def ModuleHasValidMainFunction(module):
 if (hasattr(module, 'main') and (type(module.main) is types.FunctionType)):
  (arg_names, var_args, var_kwargs, default_values) = inspect.getargspec(module.main)
  if (len(arg_names) == 0):
   return True
  if ((default_values is not None) and (len(arg_names) == len(default_values))):
   return True
 return False

def ModuleHasValidMainFunction ( module ) : if ( hasattr ( module , 'main' ) and ( type ( module . main ) is types . FunctionType ) ) : ( arg_names , var_args , var_kwargs , default_values ) = inspect . getargspec ( module . main ) if ( len ( arg_names ) == 0 ) : return True if ( ( default_values is not None ) and ( len ( arg_names ) == len ( default_values ) ) ) : return True return False
determines if a module has a main function that takes no arguments .