#!/usr/bin/perl
use strict;
use warnings;
use Inline::Files;
use Inline Python =>  'below';

print "compile made it\n";
while (<DATA>) {print;} # test data section for non-corruption

while (1) { # test python functions
 reset_on();
 psleep .01;
 reset_off();
 sleep 1;
}
END { # perl end block - hit after ctrl-c and whatnot.
reset_off();
 GPIO_cleanup();
 print "we died happy\n";
}

__DATA__
Some data crap
more crap - would be gtk3 XML here

__PYTHON__
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
RESET_PIN = 17
GPIO.setup(RESET_PIN,GPIO.OUT)

def reset_on():
 	GPIO.output (RESET_PIN,True)
def reset_off():
	GPIO.output(RESET_PIN,False)
def psleep(sec):
	time.sleep(sec)
def GPIO_cleanup():
	GPIO.cleanup
