About 7,940,000 results
Open links in new tab
  1. How to write a Python module/package? - Stack Overflow

    Apr 1, 2013 · Python 3 - UPDATED 18th November 2015 Found the accepted answer useful, yet wished to expand on several points for the benefit of others based on my own experiences. …

  2. python - How to list all functions in a module? - Stack Overflow

    I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it. I want to call the help function on each one. In …

  3. python - What is the purpose of the -m switch? - Stack Overflow

    In Python 2.4, a module located using -m is executed just as if its filename had been provided on the command line. With -m more is possible, like working with modules which are part of a …

  4. syntax - What does __all__ mean in Python? - Stack Overflow

    That file is what makes the directory an actual Python package. For example, say you have the following files in a package: package ├── __init__.py ├── module_1.py └── module_2.py …

  5. How can I get a list of all classes within current module in Python?

    If I import classes in this module at the module level (i.e., from optparse import OptionParser) those modules are included in the print list. How might I avoid that?

  6. How do I import other Python files? - Stack Overflow

    How do I import files in Python? I want to import: a file (e.g. file.py) a folder a file dynamically at runtime, based on user input one specific part of a file (e.g. a single function)

  7. python - No module named pkg_resources - Stack Overflow

    Sep 16, 2011 · ImportError: No module named pkg_resources pkg_resources appears to be distributed with setuptools. Initially I thought this might not be installed to the Python in the …

  8. What's the difference between a module and package in Python?

    Oct 30, 2011 · Module: A module is a simple Python file with a (.py) extension that contains collections of functions and global variables. It is an executable file, and the notion of Package …

  9. How to fix "ImportError: No module named ..." error in Python?

    A better fix than setting PYTHONPATH is to use python -m module.path This will correctly set sys.path[0] and is a more reliable way to execute modules. I have a quick writeup about this …

  10. Whats the difference between a module and a library in Python?

    Oct 5, 2013 · Packages are a way of structuring Python’s module namespace by using “dotted module names”. If you read the documentation for the import statement gives more details, for …