original_docstring: Automatically load Morepath configuration from packages.
  
      Morepath configuration consists of decorator calls on :class:`App`
      instances, i.e. ``@App.view()`` and ``@App.path()``.
  
      This function tries to load needed Morepath configuration from all
      packages automatically. This only works if:
  
       - The package is made available using a ``setup.py`` file.
  
       - The package or a dependency of the package includes
         ``morepath`` in the ``install_requires`` list of the
         ``setup.py`` file.
  
       - The ``setup.py`` name is the same as the name of the
         distributed package or module. For example: if the module
         inside the package is named ``myapp`` the package must be named
         ``myapp`` as well (not ``my-app`` or ``MyApp``).
  
      If the ``setup.py`` name differs from the package name, it's
      possible to specify the module morepath should scan using entry
      points::
  
          setup(name='some-package',
            ...
            install_requires=[
                'setuptools',
                'morepath'
            ],
            entry_points={
                'morepath': [
                    'scan = somepackage',
                ]
            })
  
      This function simply recursively imports everything in those packages,
      except for test directories.
  
      In addition to calling this function you can also import modules
      that use Morepath directives manually, and you can use
      :func:`scan` to automatically import everything in a
      single package.
  
      Typically called immediately after startup just before the
      application starts serving using WSGI.
  
      ``autoscan`` always ignores ``.test`` and ``.tests``
      sub-packages -- these are assumed never to contain useful Morepath
      configuration and are not scanned.
  
      ``autoscan`` can fail with an ``ImportError`` when it tries to
      scan code that imports an optional dependency that is not
      installed. This happens most commonly in test code, which often
      rely on test-only dependencies such as ``pytest`` or ``nose``. If
      those tests are in a ``.test`` or ``.tests`` sub-package they
      are automatically ignored, however.
  
      If you have a special package with such expected import errors,
      you can exclude them from ``autoscan`` using the ``ignore``
      argument, for instance using ``['special_package']``. You then can
      use :func:`scan` for that package, with a custom
      ``ignore`` argument that excludes the modules that generate import
      errors.
  
      See also :func:`scan`.
  
      :param ignore: ignore to ignore some modules
        during scanning. Optional. If ommitted, ignore ``.test`` and
        ``.tests`` packages by default. See :func:`importscan.scan` for
        more details.
  
      
docstring: Automatically load Morepath configuration from packages.
  Morepath configuration consists of decorator calls on :class:`App`
  instances, i.e.
  
  This function tries to load needed Morepath configuration from all
  packages automatically. This only works if.
  
  The package is made available using a ``setup.py`` file.
  
  
  
  The ``setup.py`` name is the same as the name of the
  distributed package or module.
  
  If the ``setup.py`` name differs from the package name, it's
  possible to specify the module morepath should scan using entry
  points:.
  
  
  
  This function simply recursively imports everything in those packages,
  except for test directories.
  
  In addition to calling this function you can also import modules
  that use Morepath directives manually, and you can use
docstring_tokens: Automatically load Morepath configuration from packages . Morepath configuration consists of decorator calls on : class : ` App ` instances i . e . This function tries to load needed Morepath configuration from all packages automatically . This only works if . The package is made available using a ` ` setup . py ` ` file . The ` ` setup . py ` ` name is the same as the name of the distributed package or module . If the ` ` setup . py ` ` name differs from the package name it ' s possible to specify the module morepath should scan using entry points : . This function simply recursively imports everything in those packages except for test directories . In addition to calling this function you can also import modules that use Morepath directives manually and you can use
code: def autoscan(ignore=None):
      """Automatically load Morepath configuration from packages.
  
      Morepath configuration consists of decorator calls on :class:`App`
      instances, i.e. ``@App.view()`` and ``@App.path()``.
  
      This function tries to load needed Morepath configuration from all
      packages automatically. This only works if:
  
       - The package is made available using a ``setup.py`` file.
  
       - The package or a dependency of the package includes
         ``morepath`` in the ``install_requires`` list of the
         ``setup.py`` file.
  
       - The ``setup.py`` name is the same as the name of the
         distributed package or module. For example: if the module
         inside the package is named ``myapp`` the package must be named
         ``myapp`` as well (not ``my-app`` or ``MyApp``).
  
      If the ``setup.py`` name differs from the package name, it's
      possible to specify the module morepath should scan using entry
      points::
  
          setup(name='some-package',
            ...
            install_requires=[
                'setuptools',
                'morepath'
            ],
            entry_points={
                'morepath': [
                    'scan = somepackage',
                ]
            })
  
      This function simply recursively imports everything in those packages,
      except for test directories.
  
      In addition to calling this function you can also import modules
      that use Morepath directives manually, and you can use
      :func:`scan` to automatically import everything in a
      single package.
  
      Typically called immediately after startup just before the
      application starts serving using WSGI.
  
      ``autoscan`` always ignores ``.test`` and ``.tests``
      sub-packages -- these are assumed never to contain useful Morepath
      configuration and are not scanned.
  
      ``autoscan`` can fail with an ``ImportError`` when it tries to
      scan code that imports an optional dependency that is not
      installed. This happens most commonly in test code, which often
      rely on test-only dependencies such as ``pytest`` or ``nose``. If
      those tests are in a ``.test`` or ``.tests`` sub-package they
      are automatically ignored, however.
  
      If you have a special package with such expected import errors,
      you can exclude them from ``autoscan`` using the ``ignore``
      argument, for instance using ``['special_package']``. You then can
      use :func:`scan` for that package, with a custom
      ``ignore`` argument that excludes the modules that generate import
      errors.
  
      See also :func:`scan`.
  
      :param ignore: ignore to ignore some modules
        during scanning. Optional. If ommitted, ignore ``.test`` and
        ``.tests`` packages by default. See :func:`importscan.scan` for
        more details.
  
      """
      if ignore is None:
          ignore = []
          ignore.extend([".test", ".tests"])
      for package in morepath_packages():
          importscan.scan(package, ignore)
code_tokens: def autoscan ( ignore = None ) : if ignore is None : ignore = [ ] ignore . extend ( [ ".test" , ".tests" ] ) for package in morepath_packages ( ) : importscan . scan ( package , ignore )
short_docstring: Automatically load Morepath configuration from packages.
short_docstring_tokens: Automatically load Morepath configuration from packages .
comment: """Automatically load Morepath configuration from packages.
  
      Morepath configuration consists of decorator calls on :class:`App`
      instances, i.e. ``@App.view()`` and ``@App.path()``.
  
      This function tries to load needed Morepath configuration from all
      packages automatically. This only works if:
  
       - The package is made available using a ``setup.py`` file.
  
       - The package or a dependency of the package includes
         ``morepath`` in the ``install_requires`` list of the
         ``setup.py`` file.
  
       - The ``setup.py`` name is the same as the name of the
         distributed package or module. For example: if the module
         inside the package is named ``myapp`` the package must be named
         ``myapp`` as well (not ``my-app`` or ``MyApp``).
  
      If the ``setup.py`` name differs from the package name, it's
      possible to specify the module morepath should scan using entry
      points::
  
          setup(name='some-package',
            ...
            install_requires=[
                'setuptools',
                'morepath'
            ],
            entry_points={
                'morepath': [
                    'scan = somepackage',
                ]
            })
  
      This function simply recursively imports everything in those packages,
      except for test directories.
  
      In addition to calling this function you can also import modules
      that use Morepath directives manually, and you can use
      :func:`scan` to automatically import everything in a
      single package.
  
      Typically called immediately after startup just before the
      application starts serving using WSGI.
  
      ``autoscan`` always ignores ``.test`` and ``.tests``
      sub-packages -- these are assumed never to contain useful Morepath
      configuration and are not scanned.
  
      ``autoscan`` can fail with an ``ImportError`` when it tries to
      scan code that imports an optional dependency that is not
      installed. This happens most commonly in test code, which often
      rely on test-only dependencies such as ``pytest`` or ``nose``. If
      those tests are in a ``.test`` or ``.tests`` sub-package they
      are automatically ignored, however.
  
      If you have a special package with such expected import errors,
      you can exclude them from ``autoscan`` using the ``ignore``
      argument, for instance using ``['special_package']``. You then can
      use :func:`scan` for that package, with a custom
      ``ignore`` argument that excludes the modules that generate import
      errors.
  
      See also :func:`scan`.
  
      :param ignore: ignore to ignore some modules
        during scanning. Optional. If ommitted, ignore ``.test`` and
        ``.tests`` packages by default. See :func:`importscan.scan` for
        more details.
  
      """