Answers for "how to make a python file print his path"

-3

get pyhton file path python

import os

os.path.realpath(__file__)
Posted by: Guest on October-13-2020
2

path to create a text file in python

outFileName="F:\\folder\\folder\\filename.txt"
outFile=open(outFileName, "w")
outFile.write("""Hello my name is ABCD""")
outFile.close()
Posted by: Guest on May-11-2020

Code answers related to "how to make a python file print his path"

Python Answers by Framework

Browse Popular Code Answers by Language