I am creating a file with the open(file.py,"w"
) command.
The file.py
that is created has read and write permissions but I cannot exceute it.
What is the best way to create a file that I can run afterwards?
Should I, after creating the file and closing it, use os.chmod(file.py,0777)
?