• Home
  • Raw
  • Download

Lines Matching +full:packages +full:- +full:dir

1 .. _tut-modules:
51 the current :term:`namespace` (see :ref:`tut-scopes` for more details);
69 .. _tut-moremodules:
139 interpreter -- or, if it's just one module you want to test interactively,
144 .. _tut-modulesasscripts:
147 ----------------------------
165 .. code-block:: shell-session
179 .. _tut-searchpath:
182 ----------------------
187 a built-in module with that name. These module names are listed in
196 * The installation-dependent default (by convention including a
197 ``site-packages`` directory, handled by the :mod:`site` module).
199 More details are at :ref:`sys-path-init`.
211 :ref:`tut-standardmodules` for more information.
216 .. _tut-pycache:
219 -----------------------
225 version of spam.py would be cached as ``__pycache__/spam.cpython-33.pyc``. This
231 automatic process. Also, the compiled modules are platform-independent, so the
237 source module. To support a non-source (compiled only) distribution, the
243 * You can use the :option:`-O` or :option:`-OO` switches on the Python command
244 to reduce the size of a compiled module. The ``-O`` switch removes assert
245 statements, the ``-OO`` switch removes both assert statements and __doc__
248 an ``opt-`` tag and are usually smaller. Future releases may
262 .. _tut-standardmodules:
296 environment variable :envvar:`PYTHONPATH`, or from a built-in default if
304 .. _tut-dir:
306 The :func:`dir` Function
309 The built-in function :func:`dir` is used to find out which names a module
313 >>> dir(fibo)
315 >>> dir(sys) # doctest: +NORMALIZE_WHITESPACE
338 Without arguments, :func:`dir` lists the names you have defined currently::
343 >>> dir()
350 :func:`dir` does not list the names of built-in functions and variables. If you
355 >>> dir(builtins) # doctest: +NORMALIZE_WHITESPACE
377 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit',
386 .. _tut-packages:
388 Packages chapter
391 Packages are a way of structuring Python's module namespace by using "dotted
395 variable names, the use of dotted module names saves the authors of multi-module
396 packages like NumPy or Pillow from having to worry about
406 artificial stereo effect), so in addition you will be writing a never-ending
410 .. code-block:: text
412 sound/ Top-level package
440 containing the file as packages. This prevents directories with a common name,
487 .. _tut-pkg-import-star:
490 ---------------------------
497 long time and importing sub-modules might have unwanted side-effects that should
498 only happen when the sub-module is explicitly imported.
504 encountered. It is up to the package author to keep this list up-to-date when a
540 packages.
543 .. _intra-package-references:
545 Intra-package References
546 ------------------------
548 When packages are structured into subpackages (as with the :mod:`sound` package
550 packages. For example, if the module :mod:`sound.filters.vocoder` needs to use
556 parent packages involved in the relative import. From the :mod:`surround`
568 Packages in Multiple Directories
569 --------------------------------
571 Packages support one more special attribute, :attr:`__path__`. This is
584 execution of a module-level function definition adds the function name to