2011-01-14, 00:47
Hello,
I am completely new to python I have a little background in C# so I'm not completely clue less.
I want to write a simple if statement script that is aware of its previous result/action. The script will be linked to a button on the remote, so if you press the button the script preforms the ON/True fucntion as it were, press again the script preforms the OFF/False function. Similar to the EjectTray function. Press the button, the tray opens, press again the tray closes.
The only way I can think of doing this is writing something to file and using that to determine the fucntion to preform, is this the best way to do this in python?
The idea around this is to turn on / off x10 modules so there is no way of getting the state from the device.
Thanks,
Qu3
I am completely new to python I have a little background in C# so I'm not completely clue less.
I want to write a simple if statement script that is aware of its previous result/action. The script will be linked to a button on the remote, so if you press the button the script preforms the ON/True fucntion as it were, press again the script preforms the OFF/False function. Similar to the EjectTray function. Press the button, the tray opens, press again the tray closes.
The only way I can think of doing this is writing something to file and using that to determine the fucntion to preform, is this the best way to do this in python?
The idea around this is to turn on / off x10 modules so there is no way of getting the state from the device.
Thanks,
Qu3