What I’m looking to do is create a .ini generator I’ve got everything to work but this statement. There will be 5 agents but once I get one working the others are cake.
We have SUT 0 – 15, so do I need a range and why won’t this print to the text document?
def ipDSS():
ipDss = input('Please enter your SUT number:')
if ipDSS <= 16:
lines = ['agent_0_ip=192.168.5.14\n',
'agent_0_mac=99-11-99-11-99-11\n',
'agent_0_id=99\n']
text_file.writelines(lines)
You are comparing a string to an integer. Try this instead:
More info on comparisons in manual.