Wow, thanks for the quick reply..
It seems to be receiving a float. Maybe I should explain what's happening.
Web form sends a number to a txt file via PHP.
Python reads the text file and assigns a variable from the result.
The variable is the used in the time.sleep() method.
Code: Select all
f = open("/home/pi/webform/details.txt","r")
imglen = (f.readline())
Then I have this in a loop:
myProc=subprocess.Popen( [ "fbi", "--once", "-autoup", "-T", "1", "-noverbose", "-readahead" , infile])
When it reaches the time.sleep(imglen) it crashes the script and tells me it should be a float.
I have the 'print imglen' there to verify that it has the correct number assigned to it. When I start the script it outputs a float.