Thread: Trouble displaying images
i have little python script display images writing them temp file, calling eog on temp file, , calling rm on temp file after eog process closes. relevant code looks this:
the --new-instance flag important; without that, if there eog process, eog call tells pre-existing eog process display tmp.jpg , returns right away. rm executes before pre-existing eog process can open tmp.jpg. pre-existing eog process crashes.code:os.popen('(eog --new-instance tmp.jpg; rm tmp.jpg)&')
unfortunately, don't have complete control on of systems use script on. of them have outdated version of eog installed not support --new-instance, , don't want burn quota space building local copy.
there way can launch eog in way prevents detecting if there other instances? or there reliable strategy displaying images in sophisticated viewer (ie, supports zooming, panning, etc.) won't clutter directory temp files?
can kill existing process?
if not, maybe short delay before rm, using sleep command?
few ideas.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Trouble displaying images
Ubuntu
Comments
Post a Comment