WxPython displaying the terminal output upto a specific line

Tanmay Agrawal <[email protected]> Thu, 25 Aug 2022 15:29:34 +0530
Newsgroups gmane.comp.python.wxglade
Message-ID <CALF8AQPRAjKuo6yPPFtK2FgVBam7w=fu3zND4M78g1otZnbWsw@mail.gmail.com>
Hi,
Currently I am able to display my python console output in wxPython GUI.
Below is the code for it: -

class RedirectText(object):
            def __init__(self,aWxTextCtrl):
                self.out = aWxTextCtrl

            def write(self,string):
                self.out.WriteText(string)

        self.console = wx.TextCtrl(self.window_2_pane_2, wx.ID_ANY, "Low
Power Demo Suite [Version Beta]\n(c) Texas Instruments. All rights
reserved. \nC:\Software\Python\Visualizer> Running Simulation...",
style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL)
        self.console.SetMinSize((600, 200))
        self.console.SetBackgroundColour(wx.BLACK)
        self.console.SetForegroundColour(wx.WHITE)
        redir = RedirectText(self.console)
        sys.stdout = redir

The code is working perfectly fine. However what I want is, I want to
display the console output in wxpython upto a specific line only.

How can I do the same?

Thanks Regards,
Tanmay

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general