About 1,230,000 results
Open links in new tab
  1. path - Test if executable exists in Python? - Stack Overflow

    Dec 18, 2008 · So basically you want to find a file in mounted filesystem (not necessarily in PATH directories only) and check if it is executable. This translates to following plan: enumerate all …

  2. How do I check if a file is executable in Python? - CodeBuilders

    How do I check if a file is executable in Python? In Python, you can check if a file is executable using the os module. Here's a detailed explanation of the steps involved: 1. Import the os …

  3. Checking for the Existence of an Executable in Python 3

    Feb 1, 2021 · One way to check for the existence of an executable is by using the `subprocess` module in Python. This module provides a way to create new processes, connect to their …

  4. Solved: How to Determine if an Executable Exists in Python

    Dec 5, 2024 · Explore various efficient methods to check if an executable file exists in Python, enhancing your script's functionality.

  5. Python Which/Where - Find executable · GitHub

    Apr 4, 2022 · In short, remove "if os.path.isfile (execname)" and use only the contents of the else block. As of Python 3.3 there is also shutil.which. For python 2 there is from …

  6. [Python] Determining if a file is executable - Ubuntu Forums

    Apr 18, 2010 · I'm looking through the Python documentation, trying to figure out how to determine if a specified file is executable or not. I've looked through the os module, but haven't …

  7. python - Find a specific file, or find all executable files within the ...

    I wrote a function to find a specific file, or all the executable files with a given name and accessing flag, and I want to make sure it is as cross-platform as possible. Currently, I'm using the …

  8. How to Find the Path of an Executable in Python?

    Aug 11, 2021 · Here’s a minimal example that searches for the path of the 'python.EXE' executable on my Windows machine: Let’s confirm that the executable is indeed on this …

  9. File Handling In Python - Python Guides

    Convert a Python File to an EXE Using Pyinstaller; Copy File and Rename in Python; ... Get the File Size in MB using Python; Check If a File Exists and Create It If Not in Python; ... Python …

  10. How to tell whether a file is executable on Windows in Python?

    Nov 15, 2009 · using cmd.exe command "assoc .ext" you can see whether file is associated with some executable (some executable will be launched when you launch this file). You can parse …

Refresh