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

    Apr 1, 2013 · Module: A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. The file name is the module name with …

  2. Python: 'Private' module in a package - Stack Overflow

    Jan 7, 2014 · While there are not explicit private keywords there is a convention to have put private functions start with a single underscore but a double leading underscore will make it so …

  3. Defining private module functions in python - Stack Overflow

    If you define private names in a module, those names will be imported into any script that uses the syntax, 'import module_name'. Thus, assuming you had correctly defined in your example the …

  4. python - Callable modules - Stack Overflow

    Using Python version 3.10.8, formatting my code as below allowed me to: Make my module callable (thanks Alex) Keep all properties of the module accessible (e.g. methods) (thanks …

  5. simplest way to make a python module usable as a cli-tool

    Apr 12, 2020 · The guide you are following is 5 years old and a little vague. You could setup your cli-tool like so: ~ tree modules_and_packages ├── bin │ └── cli_script ├── setup.py └── …

  6. how to import a directory as python module - Stack Overflow

    Jun 28, 2017 · Add a local module containing a __path__. You can add a local module aaa.py (in fact you can add it to any location which is on the Python path) which contains the following …

  7. python - How to make a cross-module variable? - Stack Overflow

    I make most references in the form g.var, and the "g." serves as a constant reminder that I am dealing with a variable that is potentially accessible to other modules. If the value of such a …

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

  9. How to make my Python module available system wide on Linux?

    I made myself a little module which I happen to use quite a lot. Whenever I need it I simply copy it to the folder in which I want to use it. Since I am lazy I wanted to install it so that I can ca...

  10. Correct way to make a Python HTTPS request using requests …

    Some things to try: use curl to construct a request by hand, to make sure that you know what the contents of a valid request should be. If that works, then you know that there is a problem with …

Refresh