Skip to content

Instantly share code, notes, and snippets.

class Excel_Data():
def __init__(self, path):
self.name = path
self.book = xlrd.open_workbook(self.name)
self.sheet_names = self.book.sheet_names()
self.first_sheet = self.book.sheet_by_index(0)
self.xls_type = self.check_xls_type()
if self.xls_type == 'DIAMOND':
self.sales = self.build_diamond(self.first_sheet, self.xls_type)
@lindsm
lindsm / test.yml
Last active October 26, 2015 18:14
Ansible example
vars:
keys_added:
- app: "app-ce-async-bridge"
key: "ce-jms-cluster.jms.url.list"
value: ""
- app: "csr"
key: "eshopworld-csp.url"
value: "{{ eshopworld_csp_url }}"
- app: "atg-global-envconfig"
key: "ap.esw.cic.http.url"
print(
"The {0} file needs to contain a bare section.".format(
sys.argv[1]))
exit()
import xml.etree.ElementTree as ET
def get_hosts(xml_file):
''' xml.file -> list
For every sin in a given xml_file, return a list containing the FQDN.
'''
tree = ET.parse(xml_file)
root = tree.getroot()
sins = []