About 56,800 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. How to create module-wide variables in Python? - Stack Overflow

    Dec 30, 2009 · If you assign the variable without the global keyword then Python creates a new local var -- the module variable's value will now be hidden inside the function. Use the global …

  3. How to create modules in Jupyter notebook and import them?

    Aug 10, 2017 · I've created multiple python modules as .py files in a Python IDE called Pyzo in the following path: 'C:\Users\Michael\Anaconda3\Lib\site-packages' which I can then import like …

  4. Where should I put my own python module so that it can be …

    Apr 24, 2013 · this should help in creating the setup.py correctly. create a virtualenv for the project you are working on. virtualenvs have a bunch of other benefits, I am not going into the details …

  5. What is the proper way to split a python module into submodules?

    As for modules and submodules, group matching things together. "matching" is based on your own code's needs. All of the user functions? All of the DB functions? Putting things in modules …

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

    Jan 15, 2009 · __init__.py: It is a Python file found in a package directory, it is invoked when the package or a module in the package is imported. You can use this to execute package …

  7. python - Using logging in multiple modules - Stack Overflow

    See here for logging from multiple modules, and here for logging configuration for code which will be used as a library module by other code. Update: When calling fileConfig(), you may want to …

  8. python - Automatically create file 'requirements.txt' - Stack Overflow

    Mar 19, 2019 · Sometimes I download the Python source code from GitHub and don't know how to install all the dependencies. If there isn't any requirements.txt file I have to create it by hand. …

  9. python - Creating Modules with PyCharm - Stack Overflow

    Mar 15, 2018 · This is a better way to organize things that should work both within and outside of Pycharm. Unlike the Java world, Python doesn't have as many common conventions for …

  10. python - "Module Not Found Error" in Virtual environment - Stack …

    Jul 30, 2023 · I'm a newbie with Python and been trying to install modules using pip unsuccessfully in my small project. Following advice online, I've created my own virtual …

Refresh