I'm working on a picture viewer using python, that executes on startup of X (using LXDE/autostart) and accesses an attached USB drive and starts to display the images it finds. I'm using the current version of Raspbian Wheezy.
I have had to put a delay of 60 seconds on the script (using time.sleep) before it starts looking for images, because if I don't Python reports it can find the USB drive but there are no files present. This means there is quite a delay from reaching the desktop to the picture viewer starting. Is there a clever way in Python of getting round this and not having a delay?