About 23,800,000 results
Open links in new tab
  1. How to Run Your Python Scripts and Code

    On Windows, Linux, and macOS, use the command line by typing python script_name.py to run your script. You can also use the python command with the -m option to execute modules. …

  2. Python Modules - W3Schools

    There are several built-in modules in Python, which you can import whenever you like. Import and use the platform module: There is a built-in function to list all the function names (or variable …

  3. 6. ModulesPython 3.13.3 documentation

    1 day ago · A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) …

  4. Execution of Python code with -m option or not - Stack Overflow

    Mar 7, 2014 · When you use the -m command-line flag, Python will import a module or package for you, then run it as a script. When you don't use the -m flag, the file you named is run as …

  5. How to Run Python Scripts Files, Modules, Packages from the …

    Run Python Modules from the Command Line. If the fully qualified name given by the value of the module-name argument corresponds to a Python module, then the module will be run, which …

  6. Run function from the command line In Python - GeeksforGeeks

    Apr 24, 2025 · To run a Python script as a module follow as illustrated, Here you can see we haven't used the .py extension after the filename as show_time is treated as a module.

  7. Run Your Python Modules. To run a Python module using the

    Aug 8, 2024 · By following this guide, you can effortlessly structure and run your Python modules using the -m flag, ensuring a clear entry point for your application. Additionally, leveraging …

  8. How to Run a Python Script: A Complete Guide – TheLinuxCode

    4 days ago · Run by pressing F5 or selecting Run > Run Module; While basic, IDLE is perfect for beginners and quick scripts. Method 5: Running Python Scripts as Modules. Python‘s module …

  9. Python Modules: Bundle Code And Import It From Other Files

    Apr 7, 2023 · How to create runnable Python modules. Inside a module, you can detect if it is used as a module or a script. This is useful because it allows you to both run a module on its …

  10. Locating and Executing Python Modules using Runpy

    Learn how to locate and execute Python modules using the Runpy module in this comprehensive guide.

  11. Some results have been removed
Refresh