About 453,000 results
Open links in new tab
  1. Open File in Another Directory (Python) - Stack Overflow

    Sep 9, 2015 · Do you need to set the current directory to subfldr1 and open the file inside? Or do you only need to open the file, but whether your current directory has changed does not matter?

  2. Python: How to open a folder on Windows Explorer (Python 3.6.2, …

    Feb 12, 2018 · 29 If I store the path that i want to open in a string called finalpath which looks something like this: "./2.8 Movies/English/Die Hard Series" then how do i open this in Windows …

  3. python - How to reliably open a file in the same directory as the ...

    Closed 2 years ago. I used to open files that were in the same directory as the currently running Python script by simply using a command like:

  4. python - How to open every file in a folder - Stack Overflow

    217 I have a python script parse.py, which in the script open a file, say file1, and then do something maybe print out the total number of characters.

  5. python - open () gives FileNotFoundError / IOError: ' [Errno 2] No …

    Most likely, the problem is that you're using a relative file path to open the file, but the current working directory isn't set to what you think it is. It's a common misconception that relative …

  6. open file in "w" mode: IOError: [Errno 2] No such file or directory

    Since you don't have a 'starting' slash, your python script is looking for this file relative to the current working directory (and not to the root of the filesystem).

  7. Browse files and subfolders in Python - Stack Overflow

    Apr 28, 2011 · The first parameter is the directory pathname. This will change for each subdirectory. This answer is based on the 3.1.1 version documentation of the Python Library. …

  8. python - Why am I getting a FileNotFoundError? - Stack Overflow

    $ python script.py In order to make this work, the directory containing the python executable must be in the PATH, a so-called environment variable that contains directories that are …

  9. How to read a file in other directory in python - Stack Overflow

    Perhaps the user you are running Python as does not have permissions to open the file. Run Python as a different user or change the owner/group of the file.

  10. Python can't open file "No such file or directory" [duplicate]

    Aug 11, 2017 · When you execute the code, Python is searching for the file in the location where the VSCode executable is located. This setting can be changed to the directory that you are …