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
~/couchdb_python_26_svn/couchdb director$ nosetests -v --with-doctest client.py | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ToscaWidgets-0.9.5dev_20081026-py2.6.egg/tw/core/view.py:202: DeprecationWarning: object.__new__() takes no parameters | |
obj = object.__new__(cls, *args, **kw) | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PEAK_Rules-0.5a1.dev_r2582-py2.6.egg/peak/rules/indexing.py:220: DeprecationWarning: object.__new__() takes no parameters | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead | |
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead | |
Doctest: couchdb.client ... ok | |
Doctest: couchdb.client.Database ... ok | |
Doctest: couchdb.cli |
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
while [x for x in range(100) if x%2 == 0]: | |
print x | |
for x in range(100): | |
if x%2 == 0: | |
print x |
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 |
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
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 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
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 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 | |
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) |