This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try: | |
| int(a) | |
| if a > 10: | |
| raise | |
| except: | |
| a = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| import socket | |
| from wsgiref.simple_server import make_server | |
| from threading import Thread | |
| from datetime import datetime | |
| class WebServer(Thread): | |
| def __init__(self, window): | |
| Thread.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| import socket | |
| from wsgiref.simple_server import make_server | |
| from threading import Thread | |
| from datetime import datetime | |
| class WebServer(Thread): | |
| def __init__(self, window): | |
| Thread.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| import socket | |
| from wsgiref.simple_server import make_server | |
| from threading import Thread | |
| from datetime import datetime | |
| class WebServer(Thread): | |
| def __init__(self, window): | |
| Thread.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import socket, Growl | |
| notifier = Growl.GrowlNotifier("ipgrowl.py", ["ip"]) | |
| notifier.register() | |
| notifier.notify("ip",socket.gethostbyname(socket.gethostname()),"Your Ip address",sticky=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| import socket | |
| class Frame(wx.Frame): | |
| def __init__(self): | |
| wx.Frame.__init__(self,None,-1, "Hello World", size = ( 400,400)) | |
| self.Bind(wx.EVT_LEFT_DOWN, lambda evt: wx.StaticText(self, -1, socket.gethostbyname(socket.gethostname()), evt.GetPosition())) | |
| if __name__ == "__main__": | |
| app = wx.PySimpleApp() | |
| Frame().Show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| class Frame(wx.Frame): | |
| def __init__(self): | |
| wx.Frame.__init__(self,None,-1, "Hello World", size = ( 400,400)) | |
| self.Bind(wx.EVT_LEFT_DOWN, lambda evt: wx.StaticText(self, -1, "inside", evt.GetPosition())) | |
| if __name__ == "__main__": | |
| app = wx.PySimpleApp() | |
| Frame().Show() | |
| app.MainLoop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DlgRetroactivoTipoCambio(g_sc.SizedDialog): | |
| def __init__(self, datos = None ): | |
| g_sc.SizedDialog.__init__(self, None, -1, "Retroactivo Tipo de Cambio", size = ( 800, 600 ), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) | |
| self.SetExtraStyle( wx.WS_EX_VALIDATE_RECURSIVELY) | |
| pane = self.GetContentsPane() | |
| pane.SetSizerType("form") | |
| self.gdatos = datos | |
| wx.StaticText(pane,-1,"Corrida Destino") | |
| corrida_destino = wx.TextCtrl(pane, -1, datos.corrida_destino, size = ( 50,20), validator = BanamexTextValidator("corrida_destino", datos)) | |
| wx.StaticText(pane,-1,"Tipo de Cambio") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| class GixDragController(wx.Control): | |
| def __init__(self, parent, source, size=(25,25)): | |
| wx.Control.__init__(self,parent, -1, size=size, style=wx.SIMPLE_BORDER) | |
| self.source = source | |
| self.SetMinSize(size) | |
| self.Bind(wx.EVT_PAINT, self.OnPaint) | |
| self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from Queue import Queue | |
| """The application's Globals object""" | |
| class Globals(object): | |
| """Globals acts as a container for objects available throughout the | |
| life of the application | |
| """ | |
| def __init__(self): | |
| """One instance of Globals is created during application |