Dec-21-2018, 03:09 PM
Hi @buran, Thanks for your inputs.
First, yes.. im using 3.5 and 3.7, Tried both but same result tho.
"by any chance, does your file ipadd.txt has a header? Add print(HOST) after line 10 or show the output from print on line 9."
- For the ipadd.txt (im not aware of any header that has been added)
- adding print(host) on line before or after 10 doesn't work tho, I have added it under line 20. Which display the host.
Line 20: print("host:",HOST)
Output: host: 10.200.200.2
Also just want to share that script seems working in a way that it can connect to the device and change the hostname.
- Another issue occur is with the password? Just want to ask if you encountered this?
Again Thanks
First, yes.. im using 3.5 and 3.7, Tried both but same result tho.
"by any chance, does your file ipadd.txt has a header? Add print(HOST) after line 10 or show the output from print on line 9."
- For the ipadd.txt (im not aware of any header that has been added)
- adding print(host) on line before or after 10 doesn't work tho, I have added it under line 20. Which display the host.
Line 20: print("host:",HOST)
Output: host: 10.200.200.2
Also just want to share that script seems working in a way that it can connect to the device and change the hostname.
- Another issue occur is with the password? Just want to ask if you encountered this?
Quote:Warning (from warnings module):
File "/usr/lib/python3.5/getpass.py", line 63
passwd = fallback_getpass(prompt, stream)
GetPassWarning: Can not control echo on the terminal.
Warning: Password input may be echoed.
Again Thanks