rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
self.result.set(0, 0.5, 0, 0)
def __init__(self, parent, cfg = None, clipboard = None): Utility.__init__( self, parent, _('Password Checker'), ( ( gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE ), ) )
79a0b64bf50b427632adc360d67d4902cd2b5af4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/79a0b64bf50b427632adc360d67d4902cd2b5af4/dialog.py
self.sect_fields = self.add_section("Account data")
self.sect_fields = self.add_section("Account Data")
def __init__(self, parent, cfg, title, e = None): Utility.__init__( self, parent, title, ( ( gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL ), ( e is None and ui.STOCK_NEW_ENTRY or ui.STOCK_EDIT, gtk.RESPONSE_OK ) ) )
17fa7d7fe0762914066dc15167ca2fcd52caf054 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/17fa7d7fe0762914066dc15167ca2fcd52caf054/dialog.py
gnome.ui.App.add_toolbar(self, toolbar, name, 16 | 1, 0, band, 0, 0)
def add_toolbar(self, toolbar, name, band): "Adds a toolbar"
bb1f01c6795848d5a23627804390ab813441c2cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/bb1f01c6795848d5a23627804390ab813441c2cc/widget.py
header += "\x00\x04\x03"
header += "\x00\x04\x05"
def __generate_header(self): "Generates a header"
aa61a503ab38810e53f9d8a7d1f0eb91c0eaa0e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/aa61a503ab38810e53f9d8a7d1f0eb91c0eaa0e0/rvl.py
GConfHandler.gconf_bind(self, key, self.__cb_gconf_get, self.__cb_gconf_set, "changed")
GConfHandler.gconf_bind(self, key, self.__cb_gconf_get, self.__cb_gconf_set, "value-changed")
def gconf_bind(self, key): GConfHandler.gconf_bind(self, key, self.__cb_gconf_get, self.__cb_gconf_set, "changed")
d891f43831d92fd91228f74fc2259165045c07b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/d891f43831d92fd91228f74fc2259165045c07b8/widget.py
if data.button == 1 and data.type == gtk.gdk._2BUTTON_PRESS and path is not None:
if data.button == 1 and data.type == gtk.gdk._2BUTTON_PRESS and path != None:
def __cb_buttonpress(self, widget, data): "Callback for handling mouse clicks"
2e6f1c3d31a63252527c467392d1aab1c2b98b82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/2e6f1c3d31a63252527c467392d1aab1c2b98b82/ui.py
if data.button == 3: if path is not None and self.selection.iter_is_selected(self.model.get_iter(path[0])) == False:
elif data.button == 3: if path != None and self.selection.iter_is_selected(self.model.get_iter(path[0])) == False:
def __cb_buttonpress(self, widget, data): "Callback for handling mouse clicks"
2e6f1c3d31a63252527c467392d1aab1c2b98b82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/2e6f1c3d31a63252527c467392d1aab1c2b98b82/ui.py
return encrypt(data)
return encrypt(data, password)
def export_data(self, entrystore, password): "Exports data to a data stream"
39b547e7f5bbf122473911a2d0ca6e529955ea4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/39b547e7f5bbf122473911a2d0ca6e529955ea4f/gpass.py
while len(e.description) + 1 < desclen and len(lines) > 0: e.description += lines[0]
d = "" while len(d) < desclen and len(lines) > 0: d += lines[0] + "\n"
def import_data(self, input, password): "Imports data from a data stream to an entrystore"
39b547e7f5bbf122473911a2d0ca6e529955ea4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/39b547e7f5bbf122473911a2d0ca6e529955ea4f/gpass.py
self.__monitor(file)
gobject.idle_add(lambda: self.__monitor(file))
def save(self, entrystore, file, password = None): "Saves an entrystore to a file"
fe95ad891e3d0c89e81aa806c6a5205471b81848 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/fe95ad891e3d0c89e81aa806c6a5205471b81848/io.py
self.emit("doubleclick", iter)
if iter != None: self.emit("doubleclick", iter)
def __cb_buttonpress(self, widget, data): "Callback for handling mouse clicks"
45dc5a1f861539277b6f5268e80daa557388de0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/45dc5a1f861539277b6f5268e80daa557388de0b/ui.py
if enableAction: identity = self._getIdentityFromSelection()
identity = self._getIdentityFromSelection() if enableAction and identity:
def _enableActions(self): enableAction = (len(self.model) > 0) self.miEdit.set_sensitive(enableAction) self.btnEdit.set_sensitive(enableAction) self.miDel.set_sensitive(enableAction) self.btnDel.set_sensitive(enableAction) if enableAction: identity = self._getIdentityFromSelection() features = transport.FEATURES[identi...
9e9476612b2c800132c9475942d1030de00c95a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/9e9476612b2c800132c9475942d1030de00c95a5/identities_dialog.py
model, selected = selection.get_selected() return model.get_value(selected, 2)
if selection: model, selected = selection.get_selected() return model.get_value(selected, 2)
def _getIdentityFromSelection(self): selection = self.lvIdentities.get_selection() model, selected = selection.get_selected() return model.get_value(selected, 2)
9e9476612b2c800132c9475942d1030de00c95a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/9e9476612b2c800132c9475942d1030de00c95a5/identities_dialog.py
if DEBUG: print 'Polling events from queue...'
def _pollEventQueue(self): if DEBUG: print 'Polling events from queue...' try: event, data = self.events.get_nowait() buf = self.txLog.get_buffer() buf.insert(buf.get_end_iter(), data) buf.insert(buf.get_end_iter(), '\n') except Queue.Empty: pass return True
e6f56beb5cffed82301fd35be2a8e12bf2dbd742 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/e6f56beb5cffed82301fd35be2a8e12bf2dbd742/main_window.py
unicode(msg), QMessageBox.Ok)
unicode(msg, 'UTF-8', 'replace'), QMessageBox.Ok)
def customEvent(self, e): t = e.type() if t == 10000: # sender thread ended work self.statusBar().message(self.__tr('Finished sending message')) msg = e.data() if msg is None: msg = self.__tr('Message has been sent.') QMessageBox.information(self, self.__tr('Information'), unicode(msg), QMessageBox.Ok) self.msgItemSele...
8700d82619872ae1766bafe3dd482743d4fe86d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/8700d82619872ae1766bafe3dd482743d4fe86d4/qjt_main.py
unicode(msg), QMessageBox.Ok)
unicode(msg, 'UTF-8', 'replace'), QMessageBox.Ok)
def notify(self, message): if message == 'item added': e = self.events.get_nowait() t = e.type() if t == 10000: # sender thread ended work self.statusBar().message(self.__tr('Finished sending message')) msg = e.data() if msg is None: msg = self.__tr('Message has been sent.') QMessageBox.information(self, self.__tr('Inf...
8700d82619872ae1766bafe3dd482743d4fe86d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/8700d82619872ae1766bafe3dd482743d4fe86d4/qjt_main.py
if selection:
if not (None in selection.get_selected()):
def _getIdentityFromSelection(self): selection = self.lvIdentities.get_selection() if selection: model, selected = selection.get_selected() return model.get_value(selected, 2)
d18192b061fbca8500d56b996dc54a25b9bdc36e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/d18192b061fbca8500d56b996dc54a25b9bdc36e/identities_dialog.py
self.controller.discoverWeblogs(identity, self)
if identity: self.controller.discoverWeblogs(identity, self)
def _discoverWeblogs(self, *args): identity = self._getIdentityFromSelection() self.controller.discoverWeblogs(identity, self)
d18192b061fbca8500d56b996dc54a25b9bdc36e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/d18192b061fbca8500d56b996dc54a25b9bdc36e/identities_dialog.py
monthStore.append((datetime.date(2005, i + 1, 1).strftime('%B'), ))
monthStr = datetime.date(2005, i + 1, 1).strftime('%B') enc = locale.getdefaultlocale()[1] monthStore.append((monthStr.decode(enc), ))
def _initGui(self): monthStore = gtk.ListStore(str) # stupid hack for i in range(12): monthStore.append((datetime.date(2005, i + 1, 1).strftime('%B'), )) self.cbxMonth.set_model(monthStore) cell = gtk.CellRendererText() self.cbxMonth.pack_start(cell, True) self.cbxMonth.add_attribute(cell, 'text', 0) self.cbxMonth.set_...
30aebeb6e4c4cd19145da9582f8c213a48eb132f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/30aebeb6e4c4cd19145da9582f8c213a48eb132f/filter_dialog.py
identity = model.get_value(self.cbxIdentity.get_active_iter(), 1) features = transport.FEATURES[identity.transportType] self.edWeblogID.set_sensitive('blogID' in features)
if len(model) > 0: identity = model.get_value(self.cbxIdentity.get_active_iter(), 1) features = transport.FEATURES[identity.transportType] self.edWeblogID.set_sensitive('blogID' in features)
def _activateFeatures(self): model = self.cbxIdentity.get_model() identity = model.get_value(self.cbxIdentity.get_active_iter(), 1) features = transport.FEATURES[identity.transportType] self.edWeblogID.set_sensitive('blogID' in features)
1c8a758c62c7eae30796167df668265a04a91fc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/1c8a758c62c7eae30796167df668265a04a91fc8/weblog_dialog.py
gobject.source_remove(self.autosaveTimer)
if self.autosaveTimer: gobject.source_remove(self.autosaveTimer)
def on_frmEntry_delete_event(self, *args): gobject.source_remove(self.autosaveTimer)
31fdc4a6705c29485f5b269898e3c0017d02fe56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/31fdc4a6705c29485f5b269898e3c0017d02fe56/entry_dialog.py
gobject.source_remove(self.autosaveTimer)
if self.autosaveTimer: gobject.source_remove(self.autosaveTimer)
def on_btnCancel_clicked(self, *args): gobject.source_remove(self.autosaveTimer) if self.isNew and self.entry: self.entry.destroySelf() self.window.destroy()
31fdc4a6705c29485f5b269898e3c0017d02fe56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/31fdc4a6705c29485f5b269898e3c0017d02fe56/entry_dialog.py
body = textile.textile(parent.parent.cfg.useReplacements(message['body']))
body = textile.textile(message['body'])
def __init__(self, message, parent, name=None, modal=0, fl=0): MsgPreviewDialogImpl.__init__(self, parent, name, modal, fl) qApp.setOverrideCursor(QCursor(Qt.WaitCursor)) try: self.setCaption('%s - %s' % (self.__tr('Message preview'), unicode(message['title']))) if message['content-type'] == 'textile': body = textile.t...
2370b416925f8d57d8dd98b159413d56c614092e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/2370b416925f8d57d8dd98b159413d56c614092e/qjt_msgpreviewdialog.py
body = parent.parent.cfg.useReplacements(message['body'])
body = message['body']
def __init__(self, message, parent, name=None, modal=0, fl=0): MsgPreviewDialogImpl.__init__(self, parent, name, modal, fl) qApp.setOverrideCursor(QCursor(Qt.WaitCursor)) try: self.setCaption('%s - %s' % (self.__tr('Message preview'), unicode(message['title']))) if message['content-type'] == 'textile': body = textile.t...
2370b416925f8d57d8dd98b159413d56c614092e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/2370b416925f8d57d8dd98b159413d56c614092e/qjt_msgpreviewdialog.py
self.setCaption('%s - %s' % (self.__tr('Message previev'),
self.setCaption('%s - %s' % (self.__tr('Message preview'),
def __init__(self, message, parent, name=None, modal=0, fl=0): MsgPreviewDialogImpl.__init__(self, parent, name, modal, fl) qApp.setOverrideCursor(QCursor(Qt.WaitCursor)) try: self.setCaption('%s - %s' % (self.__tr('Message previev'), unicode(message['title']))) if message['content-type'] == 'textile': body = textile.t...
87ac21ea3dec96f71f5c8d8519e5a4996125c3fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/87ac21ea3dec96f71f5c8d8519e5a4996125c3fe/qjt_msgpreviewdialog.py
body['pubDate'] = datetime.datetime.now().isoformat()
body['pubDate'] = email.Utils.formatdate(usegmt=True)
def postNew(self, blogId, entry, categories): if DEBUG: print 'started sending' s = self.getServerProxy() body = {} body['flNotOnHomePage'] = False body['title'] = entry.title.encode('utf-8') body['description'] = renderBodyAsXML(entry.body.encode('utf-8'), entry.bodyType) body['categories'] = [] for category in catego...
02362acb847fbae0618ef942a2334d454e484b2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/02362acb847fbae0618ef942a2334d454e484b2a/commonxmlrpc.py
body['pubDate'] = datetime.datetime.now().isoformat()
body['pubDate'] = email.Utils.formatdate(usegmt=True)
def postModified(self, blogId, entryId, entry, categories): if DEBUG: print 'started sending modified entry' s = self.getServerProxy() body = {} body['flNotOnHomePage'] = False body['title'] = entry.title.encode('utf-8') body['description'] = renderBodyAsXML(entry.body.encode('utf-8'), entry.bodyType) body['categories'...
02362acb847fbae0618ef942a2334d454e484b2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2229/02362acb847fbae0618ef942a2334d454e484b2a/commonxmlrpc.py
common.inprint("DEBUG_ASSERT(s" + str(i) + ".hasValues());")
common.inprint("SH_DEBUG_ASSERT(s" + str(i) + ".hasValues());")
def scalarcons(self, args, size, extraTplArg=[]): common.inprint(self.tpl(size)) if len(extraTplArg) > 0: common.inprint("template<" + ", ".join(extraTplArg) + ">") #common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint(" : Gen...
7d15a506ac58e12f157fb7126a1f6d927a347dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/7d15a506ac58e12f157fb7126a1f6d927a347dec/AttribImpl.hpp.py
common.inprint("DEBUG_ASSERT(s0.hasValues());")
common.inprint("SH_DEBUG_ASSERT(s0.hasValues());")
def scalarcons(self, args, size, extraTplArg=[]): common.inprint(self.tpl(size)) if len(extraTplArg) > 0: common.inprint("template<" + ", ".join(extraTplArg) + ">") #common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint(" : Gen...
7d15a506ac58e12f157fb7126a1f6d927a347dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/7d15a506ac58e12f157fb7126a1f6d927a347dec/AttribImpl.hpp.py
common.inprint("assert(!ShEnvironment::insideShader);") common.inprint("assert(" + other + ".hasValues());")
common.inprint("SH_DEBUG_ASSERT(!ShEnvironment::insideShader);") common.inprint("SH_DEBUG_ASSERT(" + other + ".hasValues());")
def copycons(self, args, size): other = args[0][1]
25b725915a65cb6c30e4e963b68089d28e727e82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/25b725915a65cb6c30e4e963b68089d28e727e82/ShAttribImpl.hpp.py
def assign(self, fun, args, size): common.inprint(self.tpl(size) + "\n" + self.tplcls(size) + "&\n" + self.tplcls(size) + "::" + fun + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint("{") common.indent() other = args[0][1] if fun[-1] == "=" and fun[-2] in ["+", "-", "/", "*"]: common.inprint("*this =...
def assign(self, fun, args, size): common.inprint(self.tpl(size) + "\n" + self.tplcls(size) + "&\n" + self.tplcls(size) + "::" + fun + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint("{") common.indent() other = args[0][1] if fun[-1] == "=" and fun[-2] in ["+", "-", "/", "*"]: common.inprint("*this =...
25b725915a65cb6c30e4e963b68089d28e727e82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/25b725915a65cb6c30e4e963b68089d28e727e82/ShAttribImpl.hpp.py
common.inprint("return *this;") common.deindent() common.inprint("}") common.inprint("")
def assign(self, fun, args, size): common.inprint(self.tpl(size) + "\n" + self.tplcls(size) + "&\n" + self.tplcls(size) + "::" + fun + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint("{") common.indent() other = args[0][1] if fun[-1] == "=" and fun[-2] in ["+", "-", "/", "*"]: common.inprint("*this =...
25b725915a65cb6c30e4e963b68089d28e727e82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/25b725915a65cb6c30e4e963b68089d28e727e82/ShAttribImpl.hpp.py
epsilon = ''
epsilon = ', ' + str(EPSILON)
def output(self, out, standalone=True): if standalone: self.output_header(out) self.output_textures(out) programs = {} test_nb = 0 for test, testcalls in self.tests: types = test[2] src_arg_types = zip(test[1], types[1:]) for i, call in enumerate(testcalls): testname = make_testname(src_arg_types, types, call.key(), te...
58adc03afd98c353ef5d0b7d249e54c0c896e686 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/58adc03afd98c353ef5d0b7d249e54c0c896e686/shtest.py
epsilon = ''
epsilon = ', ' + str(EPSILON)
def output(self, out, standalone=True): if standalone: self.output_header(out) self.output_textures(out) test_nb = 0 for test, testcalls in self.tests: types = test[2] src_arg_types = zip(test[1], types[1:]) for i, call in enumerate(testcalls): testname = make_testname(src_arg_types, types, call.key(), test_nb) out.wri...
58adc03afd98c353ef5d0b7d249e54c0c896e686 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/58adc03afd98c353ef5d0b7d249e54c0c896e686/shtest.py
test.add_test(func((1 - 0.1, -1 + 0.1, 0.0), op)) test.add_test(func((-0.5, -0.9, -0.1), op))
test.add_test(func((1 - 0.1, 0.0), op)) test.add_test(func((-1 + 0.1,), op, [], 0.09)) test.add_test(func((-0.5, -0.1), op))
def insert_into2(test, op): test.add_test(func((0.0,), op)) test.add_test(func((0.3, 0.5, 0.8, 0.9), op)) test.add_test(func((1 - 0.1, -1 + 0.1, 0.0), op)) test.add_test(func((-0.5, -0.9, -0.1), op)) test.add_test(func((0.5, 0.6, 0.9), op))
fea73b4c1d7bc5818e6582f499330d1e5db18950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/fea73b4c1d7bc5818e6582f499330d1e5db18950/trig.cpp.py
def length(a, types=[]):
def length(a):
def length(a, types=[]): s = 0 for x in a: s += x*x result = sqrt(s) return shtest.make_test([result], [a], types)
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
result = sqrt(s) return shtest.make_test([result], [a], types)
return [sqrt(s)]
def length(a, types=[]): s = 0 for x in a: s += x*x result = sqrt(s) return shtest.make_test([result], [a], types)
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0)))
def length_1(a): result = 0 for x in a: result += abs(x) return [result]
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
test.add_test(length((0.2, 2.7, 3.23))) test.add_test(length((0.2, 2.7, -3.23))) test.add_test(length((0.2, -2.7, -3.23))) test.add_test(length((-0.2, -2.7, -3.23))) test.add_test(length((-0.2, -2.7, 3.23))) test.add_test(length((-0.2, 2.7, 3.23)))
def length_inf(a): result = a[0] for x in a: if abs(x) > result: result = abs(x) return [result]
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
test.add_test(length((0.0,))) test.add_test(length((0.0, 0.0, 0.0))) test.add_test(length((0.0, 0.0, 0.0, 0.0))) test.add_test(length((0.0, 0.0, 0.0, 0.0)))
def sub(a, b): result = [] for i in range(len(a)): result.append(a[i] - b[i]) return result
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
test.add_test(length((1.0,))) test.add_test(length((-1.0,))) test.add_test(length((1000.0,))) test.add_test(length((-1000.0,))) test.add_test(length((0.5,))) test.add_test(length((-0.5,)))
def length_test(a, func, types=[]): return shtest.make_test(func(a), [a], types) def distance_test(a, b, func, types=[]): return shtest.make_test(func(sub(a, b)), [a, b], types) def insert_into1(test, func): test.add_test(length_test((1.0, 2.0, 3.0), func)) test.add_test(length_test((1.0, 2.0, -3.0), func)) test.add...
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
insert_into(test)
insert_into1(test, length)
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
insert_into(test)
insert_into1(test, length) test.output(sys.stdout, False) test = shtest.ImmediateTest('length_1_im', 1) test.add_call(shtest.Call(shtest.Call.call, 'length_1', 1)) insert_into1(test, length_1) test.output(sys.stdout, False) test = shtest.ImmediateTest('length_inf_im', 1) test.add_call(shtest.Call(shtest.Call.call, ...
def insert_into(test): test.add_test(length((1.0, 2.0, 3.0))) test.add_test(length((1.0, 2.0, -3.0))) test.add_test(length((1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, -3.0))) test.add_test(length((-1.0, -2.0, 3.0))) test.add_test(length((-1.0, 2.0, 3.0))) test.add_test(length((0.2, 2.7, 3.23))) test.add_test...
386bde21d5bec4164a9d7b4a5d57f3021e9adfef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/386bde21d5bec4164a9d7b4a5d57f3021e9adfef/length.cpp.py
common.inprint(" : ShGeneric<" + self.sizevar(size) + ", T>" + "(node)")
common.inprint(" : ShGeneric<" + self.sizevar(size) + ", T>" + "(node, swizzle, neg)")
def constructors(self, size = 0): common.inprint(self.tpl(size)) common.inprint(self.tplcls(size) + "::" + self.name + "()") common.inprint(" : ShGeneric<" + self.sizevar(size) + ", T>" + "(new ShVariableNode(Binding, " + self.sizevar(size) + "))") common.inprint("{") common.inprint("}") common.inprint("")
facca941ae19f8cbcd9c8ad3d939cf84df54688e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/facca941ae19f8cbcd9c8ad3d939cf84df54688e/ShAttribImpl.hpp.py
common.inprint("m_swizzle = swizzle;") common.inprint("m_neg = neg;")
def constructors(self, size = 0): common.inprint(self.tpl(size)) common.inprint(self.tplcls(size) + "::" + self.name + "()") common.inprint(" : ShGeneric<" + self.sizevar(size) + ", T>" + "(new ShVariableNode(Binding, " + self.sizevar(size) + "))") common.inprint("{") common.inprint("}") common.inprint("")
facca941ae19f8cbcd9c8ad3d939cf84df54688e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/facca941ae19f8cbcd9c8ad3d939cf84df54688e/ShAttribImpl.hpp.py
prgname = test[0] + ''.join(combination); f.write(' ShProgram ' + prgname + ' = SH_BEGIN_PROGRAM("gpu:stream") {\n') max = 1 for i, size in enumerate(combination): f.write(' ShAttrib<' + varsize(size) + ', SH_INPUT> ' + string.ascii_uppercase[i]
for oi, op in enumerate(ops): prgname = test[0] + ''.join(combination) + str(oi); f.write(' ShProgram ' + prgname + ' = SH_BEGIN_PROGRAM("gpu:stream") {\n') max = 1 for i, size in enumerate(combination): f.write(' ShAttrib<' + varsize(size) + ', SH_INPUT> ' + string.ascii_uppercase[i]
def varsize(s): if s == 'v': return '3' if s == 's': return '1' return s
fb23f24d05b77e0fcdfd92d385d502e6858db93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/fb23f24d05b77e0fcdfd92d385d502e6858db93a/regress.py
nsize = int(varsize(size)) if nsize > max: max = nsize outsize = test[2] if outsize == 'v': outsize = str(max) f.write(' ShAttrib<' + outsize + ', SH_OUTPUT> out;\n') f.write(' out = ' + test[3][0] + ';\n') f.write(' } SH_END;\n') f.write(' ' + prgname + '->name("' + prgname + '");\n') f.write('\n') for case in...
nsize = int(varsize(size)) if nsize > max: max = nsize outsize = test[2] if outsize == 'v': outsize = str(max) f.write(' ShAttrib<' + outsize + ', SH_OUTPUT> out;\n') f.write(' ' + op + ';\n') f.write(' } SH_END;\n') f.write(' ' + prgname + '->name("' + op + ' [' + ' x '.join(combination) + ']");\n') f.write('\...
def varsize(s): if s == 'v': return '3' if s == 's': return '1' return s
fb23f24d05b77e0fcdfd92d385d502e6858db93a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/fb23f24d05b77e0fcdfd92d385d502e6858db93a/regress.py
def make_variable(arg, binding_type, value_type):
def make_variable(arg, binding_type, value_type, immediate=False):
def make_variable(arg, binding_type, value_type): if is_array(arg) and is_array(arg[0]): nrows = len(arg[0]) ncols = len(arg) return 'ShMatrix<' + str(nrows) + ', ' + str(ncols) + ', ' + binding_type + ', ' + value_type + '>' elif is_array(arg): size = len(arg) return 'ShAttrib<' + str(size) + ', ' + binding_type + ', ...
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
nrows = len(arg[0]) ncols = len(arg)
ncols = len(arg[0]) nrows = len(arg)
def make_variable(arg, binding_type, value_type): if is_array(arg) and is_array(arg[0]): nrows = len(arg[0]) ncols = len(arg) return 'ShMatrix<' + str(nrows) + ', ' + str(ncols) + ', ' + binding_type + ', ' + value_type + '>' elif is_array(arg): size = len(arg) return 'ShAttrib<' + str(size) + ', ' + binding_type + ', ...
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
def init_scalar(indent, arg, argtype, varname):
def init_scalar(indent, arg, argtype, varname, immediate):
def init_scalar(indent, arg, argtype, varname): out = indent out += make_variable(arg, 'SH_CONST', argtype) + ' ' + varname out += '(' + argtype + '(' + str(arg) + '));\n' return out
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
out += make_variable(arg, 'SH_CONST', argtype) + ' ' + varname
out += make_variable(arg, 'SH_CONST', argtype, immediate) + ' ' + varname
def init_scalar(indent, arg, argtype, varname): out = indent out += make_variable(arg, 'SH_CONST', argtype) + ' ' + varname out += '(' + argtype + '(' + str(arg) + '));\n' return out
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
def init_variable(indent, arg, argtype, varname):
def init_variable(indent, arg, argtype, varname, immediate):
def init_variable(indent, arg, argtype, varname): if is_array(arg) and is_array(arg[0]): return init_matrix(indent, arg, argtype, varname) elif is_array(arg): return init_attrib(indent, arg, argtype, varname) else: return init_scalar(indent, arg, argtype, varname)
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
return init_scalar(indent, arg, argtype, varname) def init_inputs(indent, src_arg_types):
return init_scalar(indent, arg, argtype, varname, immediate) def init_inputs(indent, src_arg_types, immediate=False):
def init_variable(indent, arg, argtype, varname): if is_array(arg) and is_array(arg[0]): return init_matrix(indent, arg, argtype, varname) elif is_array(arg): return init_attrib(indent, arg, argtype, varname) else: return init_scalar(indent, arg, argtype, varname)
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
out += init_variable(indent, arg, argtype, varname)
out += init_variable(indent, arg, argtype, varname, immediate)
def init_inputs(indent, src_arg_types): out = '' i = 0 for arg, argtype in src_arg_types: varname = string.ascii_lowercase[i] out += init_variable(indent, arg, argtype, varname) i += 1; return out
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
def init_expected(indent, arg, argtype):
def init_expected(indent, arg, argtype, immediate=False):
def init_expected(indent, arg, argtype): out = '' varname = 'exp' out += init_variable(indent, arg, argtype, varname) return out
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
out += init_variable(indent, arg, argtype, varname)
out += init_variable(indent, arg, argtype, varname, immediate)
def init_expected(indent, arg, argtype): out = '' varname = 'exp' out += init_variable(indent, arg, argtype, varname) return out
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
out.write(init_inputs(' ', src_arg_types)) out.write(init_expected(' ', test[0], types[0]))
out.write(init_inputs(' ', src_arg_types, True)) out.write(init_expected(' ', test[0], types[0], True))
def output(self, out): self.output_header(out) test_nb = 0 for test, testcalls in self.tests: types = test[2] src_arg_types = zip(test[1], types[1:]) for i, call in enumerate(testcalls): testname = make_testname(src_arg_types, types, call.key()) out.write(' { // ' + testname + '\n') out.write(init_inputs(' ', src_a...
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
out.write(' ' + make_variable(test[0], 'SH_TEMP', types[0]) + ' out;\n')
out.write(' ' + make_variable(test[0], 'SH_TEMP', types[0], True) + ' out;\n')
def output(self, out): self.output_header(out) test_nb = 0 for test, testcalls in self.tests: types = test[2] src_arg_types = zip(test[1], types[1:]) for i, call in enumerate(testcalls): testname = make_testname(src_arg_types, types, call.key()) out.write(' { // ' + testname + '\n') out.write(init_inputs(' ', src_a...
8976924ff6eb127faa58d059c4cb78dd8ae9e8a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8976924ff6eb127faa58d059c4cb78dd8ae9e8a5/shtest.py
if args[0][0] == "T":
if args[0][0] != "host_type":
def scalarcons(self, args, size, extraTplArg=[]): common.inprint(self.tpl(size)) if len(extraTplArg) > 0: common.inprint("template<" + ", ".join(extraTplArg) + ">") common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint(" : ShGe...
0e974eb2498c9e12a495b5f48c710de74441fea8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/0e974eb2498c9e12a495b5f48c710de74441fea8/ShAttribImpl.hpp.py
val = "ShAttrib<1, SH_CONST, T>(s" + str(i) + ")" common.inprint("(*this)[" + str(i) + "] = " + val + ";")
common.inprint("(*this)[" + str(i) + "] = s" + str(i) + ";")
def scalarcons(self, args, size, extraTplArg=[]): common.inprint(self.tpl(size)) if len(extraTplArg) > 0: common.inprint("template<" + ", ".join(extraTplArg) + ">") common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "(" + ', '.join([' '.join(x) for x in args]) + ")") common.inprint(" : ShGe...
0e974eb2498c9e12a495b5f48c710de74441fea8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/0e974eb2498c9e12a495b5f48c710de74441fea8/ShAttribImpl.hpp.py
common.endguard("ATTRIBIMPL_HPP")
common.endguard("SHATTRIBIMPL_HPP")
def constructors(self, size = 0): common.inprint(self.tpl(size)) #common.inprint("inline") common.inprint(self.tplcls(size) + "::" + self.name + "()") common.inprint(" : Generic<" + self.sizevar(size) + ", T>" + "(new VariableNode(Binding, " + self.sizevar(size) + ", StorageTypeInfo<T>::value_type, Semantic))") common...
33e4797bd884f580d0e1940270062eab74a39ef5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/33e4797bd884f580d0e1940270062eab74a39ef5/AttribImpl.hpp.py
def atan2_test(p, q, types=[]):
def atan2_test(p, q, types=[], epsilon=0):
def atan2_test(p, q, types=[]): result = [math.atan2(b, a) for (a, b) in common.upzip(p, q)] return shtest.make_test(result, [p, q], types)
20182a0a2a4bf3d702d866295f0f5e854901fa1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/20182a0a2a4bf3d702d866295f0f5e854901fa1c/trig.cpp.py
return shtest.make_test(result, [p, q], types)
return shtest.make_test(result, [p, q], types, epsilon)
def atan2_test(p, q, types=[]): result = [math.atan2(b, a) for (a, b) in common.upzip(p, q)] return shtest.make_test(result, [p, q], types)
20182a0a2a4bf3d702d866295f0f5e854901fa1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/20182a0a2a4bf3d702d866295f0f5e854901fa1c/trig.cpp.py
test.add_test(atan2_test((1.0, 1.0, 1.0, 1.0), (0.0, 1.0, 2.0, 3.0))) test.add_test(atan2_test((0.5, 1.5, 3.0, 50.0), (0.0, 1.0, 2.0, 3.0))) test.add_test(atan2_test((1.0, 1.0, 1.0, 1.0), (0.3, 0.5, 0.8, 0.9))) test.add_test(atan2_test((1.0, 1.0, 1.0), (math.pi, -math.pi, 0.0))) test.add_test(atan2_test((math.pi*2.0, ...
test.add_test(atan2_test((1.0, math.pi*2.0, 50, 1.0), (0.3, 1.0, 3.0, -math.pi*2.0), [], 0.015)) test.add_test(atan2_test((1.0, 1.0, 1.0), (0.0, 1.0, 2.0), [], 0.003)) test.add_test(atan2_test((0.5, 1.5, 3.0), (0.0, 1.0, 2.0), [], 0.003)) test.add_test(atan2_test((1.0, 1.0, 1.0), (0.5, 0.8, 0.9), [], 0.002)) test.add_t...
def insert_into5(test): test.add_test(atan2_test((1.0, 1.0, 1.0, 1.0), (0.0, 1.0, 2.0, 3.0))) test.add_test(atan2_test((0.5, 1.5, 3.0, 50.0), (0.0, 1.0, 2.0, 3.0))) test.add_test(atan2_test((1.0, 1.0, 1.0, 1.0), (0.3, 0.5, 0.8, 0.9))) test.add_test(atan2_test((1.0, 1.0, 1.0), (math.pi, -math.pi, 0.0))) #test.add_test(a...
20182a0a2a4bf3d702d866295f0f5e854901fa1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/20182a0a2a4bf3d702d866295f0f5e854901fa1c/trig.cpp.py
r += " image.load_PNG(\"" + self.filename + "\");\n"
r += " ShUtil::load_PNG(image, \"" + self.filename + "\");\n"
def __str__(self): # @todo type move this into test.hpp or test.cpp r = " " + self.textype + " " + self.name + ";\n"; r += " {\n" r += " ShImage image;\n" r += " image.load_PNG(\"" + self.filename + "\");\n" r += " " + self.name + ".size(image.width(), image.height());\n" r += " " + self.name + "....
8025bdfc46e58f879d37780d21faec653b5aa15c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1804/8025bdfc46e58f879d37780d21faec653b5aa15c/shtest.py
def getChannelname(self): return self._channelname
2dea00fad95bfbdf5fba5090f1c85e147a6c9c11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/2dea00fad95bfbdf5fba5090f1c85e147a6c9c11/window_channel.py
if to != "":
if to.startswith(" to = "" else:
def addMessage(self, text, from_, to=""): """Formats a message in a pretty way with the given arguments.
2dea00fad95bfbdf5fba5090f1c85e147a6c9c11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/2dea00fad95bfbdf5fba5090f1c85e147a6c9c11/window_channel.py
new_topic = " ".join(params[1:])
new_topic = " ".join(params[0:])
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
22e443c770e928e8ec40a7b882b49aabe6563faf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/22e443c770e928e8ec40a7b882b49aabe6563faf/wxserver.py
self.connection.topic(channel=params[0], new_topic=new_topic)
if params[0] in self.channels: new_topic = " ".join(params[1:]) if new_topic: self.connection.topic(channel=param[0], new_topic=" ".join(param[1:])) window.sever_event("%s has changed the topic of %s: %s" % (self.connection.get_nickname(), param[0], " ".join(param[1:]))) else: self.connection.topic(channel=window.get_c...
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
22e443c770e928e8ec40a7b882b49aabe6563faf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/22e443c770e928e8ec40a7b882b49aabe6563faf/wxserver.py
self.connection.topic(channel=params[0])
self.connection.topic(channel=window.get_channelname())
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
22e443c770e928e8ec40a7b882b49aabe6563faf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/22e443c770e928e8ec40a7b882b49aabe6563faf/wxserver.py
menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ALEFT, "Align switch_bar &Left") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ARIGHT, "Align switch_bar &Right") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ATOP, "Align switch_bar &Top") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ABOTTOM, "Align switch_bar &Bottom")
menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ALEFT, "Align Switchbar &Left") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ARIGHT, "Align Switchbar &Right") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ATOP, "Align Switchbar &Top") menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ABOTTOM, "Align Switchbar &Bottom")
def create_menu(self): menu_file = wx.Menu() menu_file.Append(ID_MENU_FILE_ABOUT, "&About", "About %s" % (circe_globals.APPNAME)) menu_file.AppendSeparator() menu_file.Append(ID_MENU_FILE_EXIT, "E&xit", "Exit %s" % (circe_globals.APPNAME)) menu_switchbar = wx.Menu() menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ALEFT, ...
be894747da099d8ed739423a01e12f78625b6dd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/be894747da099d8ed739423a01e12f78625b6dd4/frame_main.py
menu_tree.Append(ID_MENU_VIEW_TREE_ALEFT, "Align Tree &Left") menu_tree.Append(ID_MENU_VIEW_TREE_ARIGHT, "Align Tree &Right")
menu_tree.Append(ID_MENU_VIEW_TREE_ALEFT, "Align Treebar &Left") menu_tree.Append(ID_MENU_VIEW_TREE_ARIGHT, "Align Treebar &Right")
def create_menu(self): menu_file = wx.Menu() menu_file.Append(ID_MENU_FILE_ABOUT, "&About", "About %s" % (circe_globals.APPNAME)) menu_file.AppendSeparator() menu_file.Append(ID_MENU_FILE_EXIT, "E&xit", "Exit %s" % (circe_globals.APPNAME)) menu_switchbar = wx.Menu() menu_switchbar.Append(ID_MENU_VIEW_SWITCHBAR_ALEFT, ...
be894747da099d8ed739423a01e12f78625b6dd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/be894747da099d8ed739423a01e12f78625b6dd4/frame_main.py
self.connection.topice(channel=params[0], new_topic=new_topic)
self.connection.topic(channel=params[0], new_topic=new_topic)
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2/wxserver.py
self.connection.whois(targets=params[0])
self.connection.whois(targets=params)
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2/wxserver.py
len(params) > 1 and params[1] or ""
len(params) > 1 and params[1] or "", len(params) > 2 and params[2] or ""
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/735f8b5e1baf4f05f53fc7558d0fa45fe6cbd1c2/wxserver.py
except IndexError:
except ValueError:
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
a4ba23794ff26619bcdd9d220e541f7a36f9b345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/a4ba23794ff26619bcdd9d220e541f7a36f9b345/wxserver.py
self.server_event(text)
window.server_event(text)
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():
301ea6cfea8635fca60ce82968fe243cc019073d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/301ea6cfea8635fca60ce82968fe243cc019073d/wxserver.py
import config
import config_engine config=config_engine.Config()
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():
301ea6cfea8635fca60ce82968fe243cc019073d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/301ea6cfea8635fca60ce82968fe243cc019073d/wxserver.py
print e
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():
301ea6cfea8635fca60ce82968fe243cc019073d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/301ea6cfea8635fca60ce82968fe243cc019073d/wxserver.py
self.Bind(wx.EVT_CLOSE, self.evt_window_del)
def bind_events(self): self.panel_switchbar.bind_click(self.evt_switchbar_event) self.panel_windowarea.bind_add(self.evt_windowarea_addwindow) self.panel_windowarea.bind_del(self.evt_windowarea_delwindow) self.panel_windowarea.bind_show(self.evt_windowarea_showwindow) self.panel_windowarea.bind_set_caption(self.evt_win...
78a0869e00e6cc1b5cf7d185c731ce964e168eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/78a0869e00e6cc1b5cf7d185c731ce964e168eac/frame_main.py
except:
except (ValueError, KeyError):
def __getitem__(self, k): try: return self.config.get(self.section, k) except: try: v = DEFAULTS[k] self.__setitem__(k,v) return v except: raise KeyError, k
e29b94c9cd9f7dd092ca135488d2bc45521f4dd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/e29b94c9cd9f7dd092ca135488d2bc45521f4dd8/config_engine.py
self.txt_edit.SetValue(user+": ")
self.txt_edit.SetValue("%s%s " % (user, self.complete_suffix))
def autocomplete(self): """Autocompletes the current input""" value = self.txt_edit.GetValue() if not value: # ignore if nothing typed return get_channelname = getattr(self, "get_channelname", None) if not get_channelname: # ignore if cannot get channel name return channel = get_channelname() # get the channel name if...
96d92c0cfe9d8a17fcb2cab457da40b98c255159 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/96d92c0cfe9d8a17fcb2cab457da40b98c255159/window_base.py
self.connection.privmsg(target, cmdstring) mynick = self.connection.get_nickname() window.add_message(cmdstring, mynick)
for line in cmdstring.split("\n"): self.connection.privmsg(target, line) mynick = self.connection.get_nickname() window.add_message(line, mynick)
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
1aa9f4b3a997f8bd67e160ff8ade9b5f297c2ec2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/1aa9f4b3a997f8bd67e160ff8ade9b5f297c2ec2/wxserver.py
window.server_event("%s has joined %s." % (self.connection.get_nickname(), params[0]))
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
1aa9f4b3a997f8bd67e160ff8ade9b5f297c2ec2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/1aa9f4b3a997f8bd67e160ff8ade9b5f297c2ec2/wxserver.py
if len(params) >= 0: if "," in params[0]:
if len(params) > 0: if params[0].find(",") != -1:
def cmd_names(self,window,server,params): if len(params) >= 0: if "," in params[0]: server.connection.names(params[0].split(",")) else: server.connection.names(params) else: server.connection.names(window.get_channelname())
cf4a725ea06dd62257ca8dc2915a35f16e45f31e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/cf4a725ea06dd62257ca8dc2915a35f16e45f31e/IRCCommands.py
raise "channel_closed called for unknown channel!"
return
def channel_closed(self, channel): if channel in self.channels: del self.channels[self.channels.index(channel)] else: raise "channel_closed called for unknown channel!"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
raise "Empty command"
return
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
cmdlist = cmdstring.split() cmd = cmdlist.pop(0) params = cmdlist
params = cmdstring.split() cmd = params.pop(0)
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
raise TypeError, "You should supply two arguments: servername\ and nick"
raise TypeError, "/server syntax: /server servername [nick]"
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
nick = params[1] if len(params) > 2:
try: nick = params[1] except IndexError: nick = "circe" try:
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
else:
except (IndexError,ValueError):
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
port = int(params[1])
try: port = int(params[1]) except (IndexError,ValueError): port = 6667 try: remote_server = params[2] except IndexError: pass
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
elif cmd == "ctcp": pass
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
nicks = params[0].split(",")
if ',' in params[0]: nicks = params[0].split(',') elif ' ' in params[0]: nicks = params[0].split(' ')
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
channel = params[0] nick = params[1] if len(params) > 2:
try: channel = params[0] except IndexError: channel = window.get_channelname() try: nick = params[1] except IndexError: nick = self.connection.get_nickname() try:
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
else:
except IndexError:
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py
def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command"
3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py