Skip to content

Instantly share code, notes, and snippets.

@cgibson
Created May 27, 2011 18:53
Show Gist options
  • Save cgibson/995901 to your computer and use it in GitHub Desktop.
Save cgibson/995901 to your computer and use it in GitHub Desktop.
Retrieve next job from ducovar["JOBS"]
def get_next_job(jobs_folder):
dirList = os.listdir(jobs_folder)
for fname in dirList:
if (os.path.isfile(jobs_folder + '/' + fname)) and ("run" in fname[-3:]):
return fname[:-4]
return ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment