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

    Apr 1, 2013 · Make a python module install-able with "pip install ..." Here is an absolute minimal example, showing the basic steps of preparing and uploading your package to PyPI using …

  2. 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)

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

    Jun 8, 2023 · 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 …

  4. 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 …

  5. 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 …

  6. Python naming conventions for modules - Stack Overflow

    Apr 2, 2009 · Python packages should also have short, all-lowercase names, although the use of underscores is discouraged. When an extension module written in C or C++ has an …

  7. python - What is __init__.py for? - Stack Overflow

    The __init__.py file can contain the same Python code that any other module can contain, and Python will add some additional attributes to the module when it is imported. But just click the …

  8. How do I unload (reload) a Python module? - Stack Overflow

    Jan 13, 2009 · To quote from the docs: Python module’s code is recompiled and the module-level code re-executed, defining a new set of objects which are bound to names in the module’s …

  9. 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 …

  10. Can't import my own modules in Python - Stack Overflow

    I ran "pip install -e . " to install myapp, but when trying to run TestCase in visual studio code I still get "ImportError: No module named myapp". but if I run "python" and then in python run "from …