common.py
def readInput(fname='inp.dat'):
	"""Reads data from the input file (default = 'inp.dat')
	   and populates the parameter dictionary par"""
	
	par  = {}

	# read the input file
	for line in open(fname):

		li=line.strip()

		# if not empty or comment line; currently list or float
		if len(li) > 0 and not li.startswith("#" or " "):

			li = line.rstrip('\n').split(':')
			key = li[0].strip()
			tmp = li[1].strip()

			val = eval(tmp)

			par[key] = val

	# create output directory if none exists
	if not os.path.exists("output"):
		os.makedirs("output")
						
	return par
Reads data from the input file (default = 'inp.dat')
	   and populates the parameter dictionary par
Reads data from the input file (default = 'inp.dat')
and populates the parameter dictionary par
Reads data from the input file ( default = ' inp . dat ' ) and populates the parameter dictionary par
def readInput(fname='inp.dat'):
	par  = {}
	for line in open(fname):
		li=line.strip()
		if len(li) > 0 and not li.startswith("#" or " "):
			li = line.rstrip('\n').split(':')
			key = li[0].strip()
			tmp = li[1].strip()
			val = eval(tmp)
			par[key] = val
	if not os.path.exists("output"):
		os.makedirs("output")
	return par
def readInput ( fname = 'inp.dat' ) : par = { } for line in open ( fname ) : li = line . strip ( ) if len ( li ) > 0 and not li . startswith ( "#" or " " ) : li = line . rstrip ( '\n' ) . split ( ':' ) key = li [ 0 ] . strip ( ) tmp = li [ 1 ] . strip ( ) val = eval ( tmp ) par [ key ] = val if not os . path . exists ( "output" ) : os . makedirs ( "output" ) return par
Reads data from the input file (default = 'inp.dat')
and populates the parameter dictionary par
Reads data from the input file ( default = ' inp . dat ' ) and populates the parameter dictionary par
"""Reads data from the input file (default = 'inp.dat')
	   and populates the parameter dictionary par""" # read the input file # if not empty or comment line; currently list or float # create output directory if none exists
fname