How do I write open(SCRPT, ">$script") or die...; in python?? Im trying to run a script in python to automate a slurm job. For that, I am trying to create and open a file names SCRPT and write a block of code to be read and executed.
Is it SCRPT = open(script) with open(SCRPT)