1st Python experience- knocked a script up to reboot a network device using the telnetlib to connect & send/recieve the commands. This works fine, however the problem im having is that upon connecting the command line displays the previous command issued so my script just writes over the top; E.g.
like that.. Also to make things worse the backspace key wont clear the 'exit', only the DEL key will remove the text. So, what I need to do is "send" the delete key several times before issuing the command. Its messy but I cant think of any other way. Any ideas on how I can do this?
Code:
> exitreboot
like that.. Also to make things worse the backspace key wont clear the 'exit', only the DEL key will remove the text. So, what I need to do is "send" the delete key several times before issuing the command. Its messy but I cant think of any other way. Any ideas on how I can do this?