bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,900
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,901
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,902
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,903
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
deftext_command(self,cmdstring,window):ifnotcmdstring:raise"Emptycommand"
30,904
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,905
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,906
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,907
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,908
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,909
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
30,910
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
30,911
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
30,912
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
30,913
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
defcheck_events(self):"""Redirectsallreceivedeventstothecorrectwindows."""#Printeventsanddisplaythemintherigthwindows.foreinself.get_events():
30,914
def nick(self, nick, user="circe", host="circe"): IC.send("USER %s %s %s %s\r\n" % (nick, user,host,user)) IC.send("NICK %s %s\r\n" % (nick, user))
def nick(self, nick, user="circe", host="circe"): IC.send("USER %s %s %s %s\r\n" % (nick, user,host,user)) IC.send("NICK %s %s\r\n" % (nick, user))
30,915
def userQuit(self, event): """Removes a users from the list and informs that the user has quit."""
def userQuit(self, event): """Removes a users from the list and informs that the user has quit."""
30,916
def __init__(self, windowarea, server, channelname): WindowServer.__init__(self, windowarea, server, channelname)
defself.command_buffer = [] self.current_area_up = 0 self.current_area_down = 0 self.tmp_buffer = "" __init__(self,self.command_buffer = [] self.current_area_up = 0 self.current_area_down = 0 self.tmp_buffer = "" windowarea,self.command_buffer = [] self.current_area_up = 0 self.current_area_down = 0 self.tmp_buffer = "...
30,917
def __init__(self): wx.Frame.__init__(self, None, -1, circe_globals.APPNAME + " " + circe_globals.VERSION, wx.DefaultPosition, wx.Size(600, 400)) self.CreateStatusBar() self.SetStatusText("Welcome to " + circe_globals.APPNAME + " version " + circe_globals.VERSION + " (" + circe_globals.APPTAG + ")") self.toolbar_Chan...
def __init__(self): wx.Frame.__init__(self, None, -1, circe_globals.APPNAME + " " + circe_globals.VERSION, wx.DefaultPosition, wx.Size(600, 400)) self.CreateStatusBar() self.SetStatusText("Welcome to " + circe_globals.APPNAME + " version " + circe_globals.VERSION + " (" + circe_globals.APPTAG + ")") self.toolbar_Chan...
30,918
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
def check_events(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.get_events():
30,919
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,920
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,921
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
30,922
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
30,923
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
30,924
def del_user(self, users): """Delete some users from the users list.
def del_user(self, users): """Delete some users from the users list.
30,925
def OnClick(self, *a): self.Destroy()
def OnClick(self, *a): self.Destroy()
30,926
def text_command(self,cmdstring,window): if not cmdstring: return # is raising a exception necessary? # in a debug window, do nothing if hasattr(window, "get_channelname") and \ window.get_channelname() == "debug": return
def text_command(self,cmdstring,window): if not cmdstring: return # is raising a exception necessary? # in a debug window, do nothing if hasattr(window, "get_channelname") and \ window.get_channelname() == "debug": return
30,927
def text_command(self,cmdstring,window): if not cmdstring: return # in a debug window, do nothing if hasattr(window, "get_channelname") and \ window.get_channelname() == "debug": return
def text_command(self,cmdstring,window): if not cmdstring: return # in a debug window, do nothing if hasattr(window, "get_channelname") and \ window.get_channelname() == "debug": return
30,928
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.txt_edit.SetValue("") self.server.text_command(value,...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.txt_edit.SetValue("") self.server.text_command(value,...
30,929
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
def checkEvents(self): """Redirects all received events to the correct windows.""" # Print events and display them in the rigth windows. for e in self.getEvents():
30,930
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,931
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
30,932
def users(self, users=[]): """Adds some users to the users list and update it.""" if users: for u in users: if u not in self._users.keys(): self._users[u] = ""
def users(self, users=[]): """Update the uers list and eventually add the given users.""" if users: for u in users: if u not in self._users.keys(): self._users[u] = ""
30,933
def del_user(self, users): """Deletes some users from the users list.
def del_user(self, users): """Deletes some users from the users list.
30,934
def del_user(self, users): """Deletes some users from the users list.
defdel_user(self,users):"""Deletessomeusersfromtheuserslist.
30,935
def del_user(self, users): """Deletes some users from the users list.
defdel_user(self,users):"""Deletessomeusersfromtheuserslist.
30,936
def del_user(self, users): """Deletes some users from the users list.
def del_user(self, users): """Deletes some users from the users list.
30,937
def user_quit(self, event): """Removes a users from the list and informs that the user has quit."""
def user_quit(self, event): """Removes a users from the list and informs that the user has quit."""
30,938
def add_message(self, text, from_, to=""): """Formats a message in a pretty way with the given arguments.
def add_message(self, text, from_, to=""): """Formats a message in a pretty way with the given arguments.
30,939
def add_message(self, text, from_, to=""): """Formats a message in a pretty way with the given arguments.
defadd_message(self,text,from_,to=""):"""Formatsamessageinaprettywaywiththegivenarguments.
30,940
def add_message(self, text, from_, to=""): """Formats a message in a pretty way with the given arguments.
defadd_message(self,text,from_,to=""):"""Formatsamessageinaprettywaywiththegivenarguments.
30,941
def evt_disconnect(self): self.disableChecking() # Close all channels for chan in self.server.channels: print "Closing channel: %s" % chan._channelname chan.CloseWindow()
def evt_disconnect(self): self.disableChecking() # Close all channels for chan in channellist: chan.CloseWindow()
30,942
def __init__(self,event): windowname = "About "+circe_globals.APPNAME+" "+circe_globals.VERSION wx.Dialog.__init__(self, None, -1, windowname, style=wx.DEFAULT_DIALOG_STYLE)
def __init__(self,event): windowname = "About "+circe_globals.APPNAME+" "+circe_globals.VERSION wx.Dialog.__init__(self, None, -1, windowname, style=wx.DEFAULT_DIALOG_STYLE)
30,943
def __init__(self,**kwargs): circelib.Server(**kwargs[0],**kwargs[1]) self.statuswindow = None self.channels = None
def __init__(self,*options): Server.__init__(self,*options) self.statuswindow = None self.channels = None
30,944
def AddServer(**options): s = WXServer(**options[0],**options[1]) servers.append(s) return s
def AddServer(*options): s = WXServer(*options) servers.append(s) return s
30,945
def sort(self): users = list(self._users) return users.sort()
def sort(self): users = list(self._users) return users.sort()
30,946
def users(self, users=None): """Update the uers list and eventually add the given users.""" if not users: users = []
def users(self, users=None): """Update the uers list and eventually add the given users.""" if not users: users = []
30,947
def del_user(self, users): """Delete some users from the users list.
def del_user(self, users): """Delete some users from the users list.
30,948
def __init__(self, *args, **kwargs): self.in_use = kwargs.get("in_use") self.times = 2 try: if not self.in_use: raise IndexError args[0] except IndexError: return super(AskNicknameDialog, self).__init__(None, "Please select a nickname:") self.nickname = args[0] super(AskNicknameDialog, self).__init__(None, "Nickname (%...
def __init__(self, *args, **kwargs): self.in_use = kwargs.get("in_use") self.times = 2 if self.in_use: return super(AskNicknameDialog, self).__init__(None, "Nickname (%s) is in use. Please select a different one:" % args[0]) else: return super(AskNicknameDialog, self).__init__(None, "Please select a nickname:") self.ni...
30,949
def __init__(self, *args, **kwargs): self.in_use = kwargs.get("in_use") self.times = 2 try: if not self.in_use: raise IndexError args[0] except IndexError: return super(AskNicknameDialog, self).__init__(None, "Please select a nickname:") self.nickname = args[0] super(AskNicknameDialog, self).__init__(None, "Nickname (%...
def __init__(self, *args, **kwargs): self.in_use = kwargs.get("in_use") self.times = 2 try: if not self.in_use: raise IndexError args[0] except IndexError: return super(AskNicknameDialog, self).__init__(None, "Please select a nickname:") self.nickname = args[0] super(AskNicknameDialog, self).__init__(None, "Nickname (%...
30,950
def user_quit(self, event): """Remove a users from the list and informs that the user has quit."""
def user_quit(self, event): """Remove a users from the list and informs that the user has quit."""
30,951
def __init__(self, windowarea, server, channelname): WindowServer.__init__(self, windowarea, server, channelname)
def __init__(self, windowarea, server, channelname): WindowServer.__init__(self, windowarea, server, channelname)
30,952
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == wx.WXK_RETURN or key == wx.WXK_NUMPAD_ENTER: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buff...
30,953
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed return self.command_buffer.append(value) self.txt_edit.SetValue("") self.curre...
30,954
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
30,955
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed return self.command_buffer.append(value) self.txt_edit.SetValue("") self.curre...
30,956
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed return self.command_buffer.append(value) self.txt_edit.SetValue("") self.curre...
30,957
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed return self.command_buffer.append(value) self.txt_edit.SetValue("") self.curre...
30,958
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
def txt_edit_evt_char(self, event): """Called when the user enter some text in the entry widget.""" key = event.GetKeyCode() if key == 13: # enter # Enter pressed value = self.txt_edit.GetValue() if not value: # ignore event if nothing typed event.Skip() return self.command_buffer.append(value) self.txt_edit.SetValue("...
30,959
def __init__(self,event): windowname = "About "+circe_globals.APPNAME+" "+circe_globals.VERSION wx.Dialog.__init__(self, None, -1, windowname, style=wx.DEFAULT_DIALOG_STYLE)
def __init__(self,event): windowname = "About "+circe_globals.APPNAME+" "+circe_globals.VERSION wx.Dialog.__init__(self, None, -1, windowname, style=wx.DEFAULT_DIALOG_STYLE)
30,960
def __init__(self,windowarea,server,channelname): WindowTextEdit.__init__(self, windowarea, server, channelname) self.windowarea = windowarea self.channelname = channelname self._users = {} # Store info about users self.create_controls() self.create_sizers() self.add_controls()
def __init__(self,windowarea,server,channelname): WindowTextEdit.__init__(self, windowarea, server, channelname) self.windowarea = windowarea self.channelname = channelname self._users = [] # Store info about users self.create_controls() self.create_sizers() self.add_controls()
30,961
def users(self, users=None): """Update the uers list and eventually add the given users.""" if not users: users = []
def users(self, users=None): """Update the uers list and eventually add the given users.""" if not users: users = []
30,962
def user_quit(self, event): """Remove a users from the list and informs that the user has quit."""
def user_quit(self, event): """Remove a users from the list and informs that the user has quit."""
30,963
def GetCurrentVersion(self): try: curver = self.curver except AttributeError: import urllib2 a = urllib2.urlopen("http://circe.berlios.de/version.php") curver2 = a.read() curver = curver2.split(".") self.curver = curver runver = circe_globals.VERSION.split(".")
def GetCurrentVersion(self): try: curver = self.curver except AttributeError: import urllib2 a = urllib2.urlopen("http://circe.berlios.de/version.php") curver2 = a.read() curver = curver2.split(".") self.curver = curver runver = circe_globals.VERSION.split(".")
30,964
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--daemon", "--debug", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--daemon", "--debug", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,965
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,966
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,967
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,968
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--debug", "--daemon", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,969
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--daemon", "--debug", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
def main(): # Some globals and variables global config global homedir config = {} options = [ "--config", "--configdump", "--daemon", "--debug", "--verbose", "--version" ] shortoptions = { "c":"--config", "d":"--debug", "D":"--daemon", "v":"--verbose", "V":"--version" } overwrite = [ "--daemon", "--debug", "--verbose...
30,970
def __init__(self):
def __init__(self):
30,971
def getData(self):
defself.percent += self.increase * self.run getData(self):
30,972
def __call__(self):
def __call__(self):
30,973
def doIt(self,method):
def doIt(self,method):
30,974
def grok(method): result=eval(method) log(str(result)) sz = Utils.structureSize(result) grinder.statistics.setValue(szIndex, sz) grinder.statistics.setSuccess(1)
def def __init__(self): self.percent = 0.05 self.increase = 0.05 self.run = 0 self.omero = None self.shoola = None def getData(self): self.percent += self.increase * self.run self.run += 1 data = Data(self.percent) data.setDataSource(ds) data.init() log(str(data)) print(str(self.percent)) return data grok(method): d...
30,975
def __call__(self):
def __call__(self):
30,976
def __call__(self):
def __call__(self):
30,977
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.window.title = "Receipt Generation" self.trans = Transaction() self.target=Receipt(date=today()) self.trans.track(self.target)
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.window.title = "Receipt Generation" self.trans = Transaction() self.target=Receipt(date=today()) self.trans.track(self.target)
30,978
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.window.title = "Receipt Generation" self.trans = Transaction() self.target=Receipt(date=today()) self.trans.track(self.target)
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.window.title = "Receipt Generation" self.trans = Transaction() self.target=Receipt(date=today()) self.trans.track(self.target)
30,979
def field (self, field): fieldName= self.__fieldName__ (field.name) contents= ["'%s'" % fieldName] try: try: relation= field.get_reference () type= 'RToOne' contents+= ["'%s'" % self.__tableName__ (relation.name)] if field.inverse: # contents+= ["inverse='%s'" % self.__pluralFieldName__ (field.inverse)] contents+= ["in...
def field (self, field): fieldName= self.__fieldName__ (field.name) contents= ["'%s'" % fieldName] try: try: relation= field.get_reference () type= 'RToOne' contents+= ["'%s'" % self.__tableName__ (relation.name)] if field.inverse: # contents+= ["inverse='%s'" % self.__pluralFieldName__ (field.inverse)] contents+= ["in...
30,980
def operate(self, sender=None): if self.op == None: self.X = float(self.display.text) else: if self.op == '+': self.X = self.X + float(self.display.text) elif self.op == '-': self.X = self.X - float(self.display.text) elif self.op == '*': self.X = self.X * float(self.display.text) elif self.op == '/': self.X = self.X /...
def operate(self, sender=None): if not self.resetInput: if self.op == None: self.X = float(self.display.text) else: if self.op == '+': self.X = self.X + float(self.display.text) elif self.op == '-': self.X = self.X - float(self.display.text) elif self.op == '*': self.X = self.X * float(self.display.text) elif self.op =...
30,981
def operate(self, sender=None): if self.op == None: self.X = float(self.display.text) else: if self.op == '+': self.X = self.X + float(self.display.text) elif self.op == '-': self.X = self.X - float(self.display.text) elif self.op == '*': self.X = self.X * float(self.display.text) elif self.op == '/': self.X = self.X /...
def operate(self, sender=None): if self.op == None: self.X = float(self.display.text) else: if self.op == '+': self.X = self.X + float(self.display.text) elif self.op == '-': self.X = self.X - float(self.display.text) elif self.op == '*': self.X = self.X * float(self.display.text) elif self.op == '/': self.X = self.X /...
30,982
def testWindowCanScreenshot(self): from tempfile import NamedTemporaryFile import Image import time f = NamedTemporaryFile() self.win.show() while gtk.events_pending(): gtk.main_iteration() time.sleep(1) while gtk.events_pending(): gtk.main_iteration() self.win.screenshot(f.name) i = Image.open(f.name) self.assertEqua...
def testWindowCanScreenshot(self): from tempfile import NamedTemporaryFile import Image import time f = NamedTemporaryFile(suffix='.png') self.win.show() while gtk.events_pending(): gtk.main_iteration() time.sleep(1) while gtk.events_pending(): gtk.main_iteration() self.win.screenshot(f.name) i = Image.open(f.name) se...
30,983
def __init__(self, target=None, **kw): super(PersonEditor, self).__init__(**kw) self.win.title = 'Person Editor' outer_vbox = cimarron.skin.VBox(parent=self.win) hbox = cimarron.skin.HBox(parent=outer_vbox) vbox = cimarron.skin.VBox(parent=hbox) cimarron.skin.Label(parent=vbox, text='Name:') cimarron.skin.Label(parent=...
def __init__(self, target=None, **kw): super(PersonEditor, self).__init__(**kw) self.win.title = 'Person Editor' outer_vbox = cimarron.skin.VBox(parent=self.win) hbox = cimarron.skin.HBox(parent=outer_vbox) vbox = cimarron.skin.VBox(parent=hbox) cimarron.skin.Label(parent=vbox, text='Name:') cimarron.skin.Label(parent=...
30,984
def __init__(self, target=None, **kw): super(PersonEditor, self).__init__(**kw) self.win.title = 'Person Editor' outer_vbox = cimarron.skin.VBox(parent=self.win) hbox = cimarron.skin.HBox(parent=outer_vbox) vbox = cimarron.skin.VBox(parent=hbox) cimarron.skin.Label(parent=vbox, text='Name:') cimarron.skin.Label(parent=...
def __init__(self, target=None, **kw): super(PersonEditor, self).__init__(**kw) self.win.title = 'Person Editor' outer_vbox = cimarron.skin.VBox(parent=self.win) hbox = cimarron.skin.HBox(parent=outer_vbox) vbox = cimarron.skin.VBox(parent=hbox) cimarron.skin.Label(parent=vbox, text='Name:') cimarron.skin.Label(parent=...
30,985
def newTarget(self, *a, **kw): super(PersonEditor, self).newTarget(*a, **kw) self.nameWidget.newTarget(self.target) self.surnameWidget.newTarget(self.target)
def newTarget(self, *a, **kw): super(PersonEditor, self).newTarget(*a, **kw) self.nameWidget.newTarget(self.target) self.surnameWidget.newTarget(self.target)
30,986
def __init__(self, columns=None, cls=None, **kwargs): """ @param columns: a list of B{Column}s that describe what to show in the grid, how obtain it from the objects, and eventually how to save data back to.
def __init__(self, columns=None, cls=None, onAppend=None, **kwargs): """ @param columns: a list of B{Column}s that describe what to show in the grid, how obtain it from the objects, and eventually how to save data back to.
30,987
def _cell_edited(self, cell, path, newVal, colNo, *ignore): """ A cell has been edited: keep the models in sync. """ logger.debug(`cell`+','+`path`+','+`newVal`) attribute = self.columns[colNo].attribute # modify the ListStore model... self._tvdata[path][colNo] = newVal # ... and our model value = self.value if value i...
def _cell_edited(self, cell, path, newVal, colNo, *ignore): """ A cell has been edited: keep the models in sync. """ logger.debug(`cell`+','+`path`+','+`newVal`) attribute = self.columns[colNo].attribute # modify the ListStore model... self._tvdata[path][colNo] = newVal # ... and our model if self.value is not None and...
30,988
def _cell_edited(self, cell, path, newVal, colNo, *ignore): """ A cell has been edited: keep the models in sync. """ logger.debug(`cell`+','+`path`+','+`newVal`) attribute = self.columns[colNo].attribute # modify the ListStore model... self._tvdata[path][colNo] = newVal # ... and our model value = self.value if value i...
def _cell_edited(self, cell, path, newVal, colNo, *ignore): """ A cell has been edited: keep the models in sync. """ logger.debug(`cell`+','+`path`+','+`newVal`) attribute = self.columns[colNo].attribute # modify the ListStore model... self._tvdata[path][colNo] = newVal # ... and our model value = self.value if value i...
30,989
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
30,990
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
30,991
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
deflogger.debug("%r %r %r", self.index, self.value, last) _keyreleased(self,logger.debug("%r %r %r", self.index, self.value, last) widget,logger.debug("%r %r %r", self.index, self.value, last) key_event,logger.debug("%r %r %r", self.index, self.value, last) *ignore):logger.debug("%r %r %r", self.index, self.value, last...
30,992
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
deflogger.debug('making new %r', self.index) _keyreleased(self,logger.debug('making new %r', self.index) widget,logger.debug('making new %r', self.index) key_event,logger.debug('making new %r', self.index) *ignore):logger.debug('making new %r', self.index) """logger.debug('making new %r', self.index) Alogger.debug('mak...
30,993
def _keyreleased(self, widget, key_event, *ignore): """ A key has been released: the user might be wanting to insert a row... """ # bugs will come to haunt you at night if you delete this # and don't fix the socking but that is elsewhere # (I whish at least where does he hide, the little frak) if self.value is None: se...
deflogger.debug(`self._tv.get_cursor()`) _keyreleased(self,logger.debug(`self._tv.get_cursor()`) widget,logger.debug(`self._tv.get_cursor()`) key_event,logger.debug(`self._tv.get_cursor()`) *ignore):logger.debug(`self._tv.get_cursor()`) """logger.debug(`self._tv.get_cursor()`) Alogger.debug(`self._tv.get_cursor()`) key...
30,994
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.win.title = "Receipt Generation" self.trans = Transaction() #self.commitValue(Receipt()) theReceipt = Receipt() self.target = theReceipt #self.target = Receipt() #self.trans.track(self.value) self.trans.track(theReceipt)
def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.win.title = "Receipt Generation" self.trans = Transaction() #self.commitValue(Receipt()) theReceipt = Receipt() self.target = theReceipt #self.target = Receipt() #self.trans.track(self.value) self.trans.track(theReceipt)
30,995
def discard(self, *ignore): self.trans.discard() self.target = None self.refresh()
def discard(self, *ignore): self.trans.discard() self.target = None self.refresh()
30,996
def fromXmlObj(xmlObj, parent=None): """ Helper function for loading a Cimarrón app from an xml file. (see L{fromXml}). """ if isinstance(xmlObj, libxml2.xmlDoc): # get at root element xmlObj = xmlObj.children obj = getattr(skin, xmlObj.name)() prop = xmlObj.properties while prop: setattr(obj, prop.name, eval(prop.cont...
def fromXmlObj(xmlObj, parent=None): """ Helper function for loading a Cimarrón app from an xml file. (see L{fromXml}). """ if isinstance(xmlObj, libxml2.xmlDoc): # get at root element xmlObj = xmlObj.children obj = getattr(skin, xmlObj.name)() prop = xmlObj.properties while prop: setattr(obj, prop.name, eval(prop.cont...
30,997
def search(cls, ignoreClass, qualifier): # '' or 'name == "thing"' qual = repr(qualifier) if qual!='': # *HACKY* *WHACKY* qual = re.compile('==.*\"([^\"]*)\"').search(qual).group(1) return [docType for docType in cls.__values__ if qual.upper() in docType['name'].upper()]
def search(cls, ignoreClass, qualifier): # '' or 'name == "thing"' qual = repr(qualifier) if qual!='': # *HACKY* *WHACKY* result = re.compile('==.*\"([^\"]*)\"').search(qual) if result: qual = result.group(1) return [docType for docType in cls.__values__ if qual.upper() in docType['name'].upper()]
30,998
def setThirdLabel(self, *ignore): if self.docType.value: self.thirdLabel.text = self.docType.value['other'].__name__ self.otherParty.cls = self.docType.value['other'] self.otherParty.enable()
def setThirdLabel(self, *ignore): if self.docType.value: if self.docType.value['other']: self.thirdLabel.text = self.docType.value['other'].__name__ self.otherParty.cls = self.docType.value['other'] self.otherParty.enable() else: self.thirdLabel.text = "Documento interno"
30,999