#
# dumps all the machine info for every machine you have
# loaded into console window. i use this occasionally
# to grab lists/info for machines i'm working with.
#

import sys

from buzz import *

line = "MachineInfo script loaded"
print line

kee = r"=================================================="
gval = 0

x = GetMachineNames()
		
for i in range(len(x)) :
	if x[i] == 'Master' :
		print "\nMachineInfo():\n-------------"
	else:
		da = GetMachine(x[i])
		y = GetMachineInfo (da)
		z = UnpackMachineInfo(y)
		m = z[7] #list of parameters
		auth = z[12] #authorname
		print "%s \n %s MachineInfo: \n%s \n " % (kee,x[i],kee)
		print "author : %s \n" %auth
		for i in range(len(m)): #go through list of params
			print "Parameter %s" %i
			n = m[i] #access sublist for param details
			print "name : " + n[1]  	#use pybuzz reference 
			print "description : " + n[2]	#for index numbers
			print "min value : %i" %n[3]	
			print "max value : %i\n" %n[4]
			print "%s \n" %m
			
		
