access a file in python that is created from SunGridEngine
i have a python script, that submits an job to the SGE (Sun Grid Engine). When the job is done i want to access the output file, generated from the SGE job. i see with "ls" in the directory that the file is already existing and the job is done, but python needs about 20-30 seco开发者_如何学JAVAnds to get access to that file...
is there a way to detect new created files faster ??
my problem is to differ between "need time to access the file" or "file is not existing"
i tried: os.path.exist(path) os.access(path,os.R_OK)
does not solve my problem =(
created a sleep timer which checks every second for access.. after some time (~15s), access is granted and file is usable!
精彩评论