This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from jinja2 import Template,FileSystemLoader,Environment | |
loader = FileSystemLoader('templates') | |
env = Environment(loader=FileSystemLoader('templates')) | |
tmp=[] | |
hostgroups=set() | |
hosts = csv.reader(open('hosts.csv'), delimiter=',', quotechar='"') | |
for h in hosts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# time module is needed for sleep function: | |
import time | |
# Open up the pins and set mode in/out | |
# TODO: Error handling | |
setupPin = file("/sys/class/gpio/export", "w") | |
setupPin.write("%d" % (38)) | |
setupPin.close() |