Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python open file same folder

import os
with open(os.path.join(sys.path[0], "my_file.txt"), "r") as f:
    print(f.read())
 
PREVIOUS NEXT
Tagged: #python #open #file #folder
ADD COMMENT
Topic
Name
9+1 =