I have made a script which is used to run an APP on MACOS It basically controls camera using and IP address
My problem is it required a password
I am using the http://docs.python.org/2/library/telnetlib.html#telnetlib.Telnet example from here but it is not working I do not want it to prompt the user for the password, I simply want to HardCode it everytime the app runs.
if ip:
self.conn = telnetlib.Telnet(ip, 24)
self.consume_telnet()
else:
self.conn = None
def telnet_send(self, s):
passCode = '********'
password = getpass.getpass()
if self.conn:
self.conn.write(s + '\r\n')
if password:
self.conn.read_until('Password: ')
self.conn.write(password.strip() + '\n')
else:
print s