Skip to content

Instantly share code, notes, and snippets.

View batok's full-sized avatar

Domingo Aguilera batok

  • Consultant
  • Guadalajara, Mexico
  • X @batok
View GitHub Profile
try:
int(a)
if a > 10:
raise
except:
a = 0
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)
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)
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)
import socket, Growl
notifier = Growl.GrowlNotifier("ipgrowl.py", ["ip"])
notifier.register()
notifier.notify("ip",socket.gethostbyname(socket.gethostname()),"Your Ip address",sticky=True)
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()
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()
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")
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)
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