Created
May 27, 2011 18:53
-
-
Save cgibson/995901 to your computer and use it in GitHub Desktop.
Retrieve next job from ducovar["JOBS"]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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