code: def qsub(script, job_name, dryrun=False, *args, **kwargs):
      
      print("Preparing job script...")
      job_string = gen_job(script=script, job_name=job_name, *args, **kwargs)
      env = os.environ.copy()
      if dryrun:
          print(
              "This is a dry run! Here is the generated job file, which will "
              "not be submitted:"
          )
          print(job_string)
      else:
          print("Calling qsub with the generated job script.")
          p = subprocess.Popen(
              'qsub -V', stdin=subprocess.PIPE, env=env, shell=True
          )
          p.communicate(input=bytes(job_string.encode('ascii')))
docs: Submit a job via qsub.