Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Making the Python output more friendly

#1
When running a Python script from the station tree all of the print statements are shown in a dialog at the end.  However, the text is not monospaced like we expect from a terminal.  This makes it hard to use.

Also, it is possible to select all of the test and copy it to the clipboard - but when pasting it into Notepad++ (for example) none of the linefeeds are respected so everything comes in as one long and useless line.  

Could you please consider changing this dialog?  Maybe copy "plain text" to the clipboard that has line breaks?

Thank you.
#2
Script output is not monospaced by default. However, the output supports HTML styles so you can fully customize how you present the output. 

For example, if you just want to have the print output from your Python script monospaced you could simply add this to the top of your program:
Code:
print("<p style='font-family:consolas;'>")
  




Users browsing this thread:
1 Guest(s)