#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.4 on Thu Nov 21 14:18:24 2019
#

import wx

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class panter(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: panter.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.panint = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT_ENTER, self.pantenrun, self.panint)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: panter.__set_properties
        self.SetTitle("PandaAssist1")
        self.panint.SetBackgroundColour(wx.Colour(50, 153, 204))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: panter.__do_layout
        SizeBox = wx.GridSizer(1, 1, 0, 0)
        SizeBox.Add(self.panint, 0, wx.EXPAND, 0)
        self.SetSizer(SizeBox)
        self.Layout()
        # end wxGlade

    def pantenrun(self, event):
        try:
            exec((self.panint.Value),globals())
        except Exception as rete:
            print(rete) 

# end of class panter

class PandaLines(wx.App):
    def OnInit(self):
        self.PandaAssistB = panter(None, wx.ID_ANY, "")
        self.SetTopWindow(self.PandaAssistB)
        self.PandaAssistB.Show()
        return True

# end of class PandaLines

if __name__ == "__main__":
    PandaInteract = PandaLines(0)
    PandaInteract.MainLoop()
