Home > database >  Using python to create .bat file and the run the newly created .bat file does not work
Using python to create .bat file and the run the newly created .bat file does not work

Time:11-16

I'm using Deadline monitor to automate a few processes. I don't think you'll need to know about Deadline to answer my question though.

I've created a Python script that takes a few arguments to be able to create the .bat file. I then want the same python script to run the .bat file to do what I need it to do. However, I'm not having any luck.

def main(project_path, nuke_job_id):

    dependencies_file = project_path   "\\"   "dependencies.txt"

    with open(dependencies_file, 'r') as f:
        Job_IDs = f.readlines()

    # ------------- remove unwanted characters

    list_string = str(Job_IDs)
    beginning_ids = list_string.split("[")
    end_ids = beginning_ids[1].split("]")
    job_ids_string = end_ids[0].split("'") # position 1 has what is needed

    # -------------

    temp_id = '636e4b2a518c9b626412f608'

    command = '"           
  • Related