Re: using variables with modules

2005-05-05 Thread marc . wyburn
thanks runes, that makes sense, time for me to go off and read some more about strip and try: Cheers, MW. -- http://mail.python.org/mailman/listinfo/python-list

Re: using variables with modules

2005-05-05 Thread runes
I tested your code and made a few changes: import _winreg import sys readfile = open("C:\scripts\ip.txt", 'r') IPList = readfile.readlines() for ClientIP in IPList: ClientIP = ClientIP.strip() ClientIP = r'\\' + ClientIP try: key = _winreg.ConnectRegistry(ClientIP, _winreg.H

Re: using variables with modules

2005-05-05 Thread runes
The only problem I can see, is trailing whitespace from the ip.txt file. Perhaps ClientIP.strip() will help? -- http://mail.python.org/mailman/listinfo/python-list