formatting terminal output in python

Started by wintermute000, March 12, 2015, 06:34:00 PM

Previous topic - Next topic

wintermute000

Has anybody come across a good way/library etc. used to handle terminal outputs in python?


Depending on whether I'm using say exscript or paramiko and depending on the device for example I get outputs with \r, \n\r, \\n\\r etc/


Currently I'm manually using split and functions like that to format the output but surely there must be some standard library or method available to handle this (maybe set the terminal type/encoding etc.)?