Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python open file same folder
found_anew
Programming language:
Python
2021-06-10 02:14:14
0
Q:
python open file same folder
S. Lily
Code:
Python
2021-07-28 10:15:34
import os with open(os.path.join(sys.path[0], "my_file.txt"), "r") as f: print(f.read())
0
Tags
python
file
folder
Related
python how to get the folder name of a file
import python file from another directory
list files in directory python
read all files in folder python
get directory of file python
python open each file in directory
import folder from another folder python
python get files in directory
python how to open a file in a different directory in mac
python import file from different directory
get files in directory python
open file in python directory
import files from another folder python
python script to read all file names in a folder
python find specific file in directory
get file names in folder python
New to Communities?
Join the community