mailr28196 - /trunk/prompt/interpreter.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on April 02, 2016 - 21:41:
Author: tlinnet
Date: Sat Apr  2 21:41:55 2016
New Revision: 28196

URL: http://svn.gna.org/viewcvs/relax?rev=28196&view=rev
Log:
Fix for GUI prompt bug, where ansi escape characters should not be printed 
when interpreter is inhereted from wxPython.

Modified:
    trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=28196&r1=28195&r2=28196&view=diff
==============================================================================
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Sat Apr  2 21:41:55 2016
@@ -88,7 +88,7 @@
         self.__intro_string = info.intro_text()
 
         # The prompts (change the Python prompt, as well as the function 
printouts).
-        if ansi.enable_control_chars(stream=1):
+        if ansi.enable_control_chars(stream=1) and not status.show_gui:
             self.prompt_colour_on()
         else:
             self.prompt_colour_off()
@@ -457,7 +457,7 @@
                 return
 
         # Coloured text.
-        if ansi.enable_control_chars(stream=1):
+        if ansi.enable_control_chars(stream=1) and not status.show_gui:
             sys.stdout.write(ansi.script)
 
         # Print the script.
@@ -467,7 +467,7 @@
         
sys.stdout.write("----------------------------------------------------------------------------------------------------")
 
         # End coloured text.
-        if ansi.enable_control_chars(stream=1):
+        if ansi.enable_control_chars(stream=1) and not status.show_gui:
             sys.stdout.write(ansi.end)
 
         # Terminating newline.




Related Messages


Powered by MHonArc, Updated Sat Apr 02 22:00:03 2016