Hi,<br><br>I am writing a python script which logs into the machine using pxssh, sends a command, reads the response and writes the response to the file.<br><br>But, when I open the file in the editor like vi, its showing special characters like ^M and ^[[D instead of spaces or newlines.<br>
<br>This is how my code looks like ...<br><br>s = pxssh.pxssh()<br>s.login(ip, username, password)<br><br>cmd = 'xyz'<br>s.sendline (cmd)<br>s.prompt()<br>output = s.before<br>fileWrite = open(filePath , 'wb')<br>
fileWrite.write(output)<br>s.prompt()   <br><br><br>This is how my filePath looks like when I open it using vi editor.<br><br>Starting command execution on host xxx.xxx.xxx.xxx<br><br>D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^M<br>
<br>Command executed successfully ^M<br>                  <br>Executing next command ...^M<br><br>-- <br>Regards , <br>Ashwini . K<br>