# Path: config.py
# def editbatconfig(section,item,itemvalue):
# def loadconfig():


from config import config
from os import path,remove
      'kwhin',\
      'ah',\
      'dod',\
      'power',\
      'tmax',\
      'tmin',\
      'baltime'

endcurrent="""state = {}
batpwr1hrav = [0]
excesssolar = [0]
minmaxdemandpwr = [0, {}]
""".format(inverterstate,config['DemandManager']['maxdemandpwr'])

template=['[current]','[hour]','[currentday]','[prevday]','[monthtodate]',
          '[yeartodate]','[alltime]']

def writesummaryfile():
  """ writes summary file to disk"""
  with open (config['files']['summaryfile'],'x') as summaryfile:
    for i in (template):
      summaryfile.write('{}\n'.format(i))
      for items in range(len(order)):
        summaryfile.write('{}={}\n'.format(order[items],section[order[items]]))
      if i=='[current]':
        summaryfile.write(endcurrent)
      summaryfile.write('\n')


try:

# Path: config.py
# def editbatconfig(section,item,itemvalue):
# def loadconfig():


# Path: SummaryGenerator.py
from config import config
from os import path,remove

      'kwhin',\
      'ah',\
      'dod',\
      'power',\
      'tmax',\
      'tmin',\
      'baltime'

endcurrent="""state = {}
batpwr1hrav = [0]
excesssolar = [0]
minmaxdemandpwr = [0, {}]
""".format(inverterstate,config['DemandManager']['maxdemandpwr'])

template=['[current]','[hour]','[currentday]','[prevday]','[monthtodate]',
          '[yeartodate]','[alltime]']

def writesummaryfile():
  """ writes summary file to disk"""
  with open (config['files']['summaryfile'],'x') as summaryfile:
    for i in (template):
      summaryfile.write('{}\n'.format(i))
      for items in range(len(order)):
        summaryfile.write('{}={}\n'.format(order[items],section[order[items]]))
      if i=='[current]':
        summaryfile.write(endcurrent)
      summaryfile.write('\n')


try:

  with open (config['files']['summaryfile'],'x') as summaryfile: