コード例 #1
0
ファイル: run_client.py プロジェクト: jackmacattack/Fred
import user_input

readByte=open("server.cfg","rb")       #read file
data = readByte.read()
readByte.close()

spl = data.split(";")

user_input.main(("localhost", 12345),(spl[0], int(spl[1])))
コード例 #2
0
ファイル: op.py プロジェクト: kebradford/Smore
import os

GPIO.setmode(GPIO.BCM)
GPIO.setup(13, GPIO.OUT)
GPIO.output(13, 0)

#os.putenv('SDL_VIDEODRIVER','fbcon')
#os.putenv('SDL_FBDEV','/dev/fb1')

if __name__ == "__main__":

    GPIO.cleanup()

    # getting the desired contour for the mallow
    C, I = pc.main()

    #slight delay between programs
    time.sleep(1)

    #getting the user selected level of toastedness
    TL = usr.main()

    #reading the toastiness of the contour until desired level is reached
    rt.main(TL, C)

    print("waiting for 5 seconds to cool off")
    time.sleep(5)

    #script that retrieves the mallow and makes the smore
    re.main()
コード例 #3
0
ファイル: localhost_test.py プロジェクト: jackmacattack/Fred
import run_server
import threading
import user_input


stopper = run_server.Stopper()

def server():
    run_server.run(stopper)

t = threading.Thread(name='server', target=server)
t.setDaemon(True)
t.start()

user_input.main()

print "Exiting"
stopper.stop()