开发者

access a file in python that is created from SunGridEngine

开发者 https://www.devze.com 2022-12-28 20:18 出处:网络
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 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!

0

精彩评论

暂无评论...
验证码 换一张
取 消