def ispackage(m):
 try:
  name = m.__file__
 except AttributeError:
  return 0
 return re.match('.*__init__.py[co]?$', name)

def ispackage ( m ) : try : name = m . __file__ except AttributeError : return 0 return re . match ( '.*__init__.py[co]?$' , name )
determine if a module is a package - that means .