bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _read(self, fp, fpname): cursect = None # None, or a dictionary optname = None lineno = 0 e = Exception("No error") # None, or an exception firstline = True while True: line = fp.readline() if not line: break lineno = lineno + 1 if firstline: # Skip BOM if line[:3] == '\xe...
def _read(self, fp, fpname): cursect = None # None, or a dictionary optname = None lineno = 0 e = None # None, or an exception firstline = True while True: line = fp.readline() if not line: break lineno = lineno + 1 if firstline: # Skip BOM if line[:3] == '\xef\xbb\xbf': line ...
444,900
def deserialize(packed): assert packed is not None message = packed if(len(message) != 7): raise SerializationException("Wrong number of fields in metadata") channel = message[0] infohash = message[1] description = message[2].decode("utf-8") timestamp = message[3] binarybitmask = message[4] bitmask = binaryStringToUi...
def deserialize(packed): assert packed is not None message = packed if(len(message) != 7): raise SerializationException("Wrong number of fields in metadata") channel = message[0] infohash = message[1] description = message[2].decode("utf-8") timestamp = message[3] binarybitmask = message[4] bitmask, = unpack("!L", bi...
444,901
def updateChannel(self,query_permid, query, hits): """ This function is called when there is a reply from remote peer regarding updating of a channel @param query_permid: the peer who returned the results @param query: the query string (None if this is not the results of a query) @param hits: details of all matching re...
def updateChannel(self,query_permid, query, hits): """ This function is called when there is a reply from remote peer regarding updating of a channel @param query_permid: the peer who returned the results @param query: the query string (None if this is not the results of a query) @param hits: details of all matching re...
444,902
def updateAChannel(self, publisher_id, peers = None): if peers == None: peers = RemoteQueryMsgHandler.getInstance().get_connected_peers(OLPROTO_VER_THIRTEENTH) # we prefer starting update with peers with oversion>13 fully_capable_peers = [] ol13_peers = [] for permid, selversion in peers: if selversion > OLPROTO_VER_T...
defelse: peers = [(permid, OLPROTO_VER_FOURTEENTH) for permid in peers] updateAChannel(self,else: peers = [(permid, OLPROTO_VER_FOURTEENTH) for permid in peers] publisher_id,else: peers = [(permid, OLPROTO_VER_FOURTEENTH) for permid in peers] peerselse: peers = [(permid, OLPROTO_VER_FOURTEENTH) for permid in...
444,903
def __init__(self, parent, parent_list, columns, data, original_data, leftSpacer = 0, rightSpacer = 0, showChange = False): wx.Panel.__init__(self, parent) self.parent_list = parent_list self.columns = columns self.data = data self.original_data = original_data self.showChange = showChange self.taskserver = None sel...
def __init__(self, parent, parent_list, columns, data, original_data, leftSpacer = 0, rightSpacer = 0, showChange = False): wx.Panel.__init__(self, parent) self.parent_list = parent_list self.columns = columns self.data = data self.original_data = original_data self.showChange = showChange self.highlightTimer = None...
444,904
def removeHighlight(): try: self.ShowSelected() except: #PyDeadError pass
def removeHighlight(): try: self.ShowSelected() except: #PyDeadError pass
444,905
def FilterItems(self, keyword, column = 0): new_filter = keyword.lower() if new_filter != self.filter or column != self.filtercolumn: self.filter = new_filter self.filtercolumn = column try: re.compile(self.filter) except: #regex incorrect self.filter = '' return False finally: self.Scroll(-1, 0) self.Freeze() self....
def FilterItems(self, keyword, column = 0): new_filter = keyword.lower() if new_filter != self.filter or column != self.filtercolumn: self.filter = new_filter self.filtercolumn = column try: re.compile(self.filter) except: #regex incorrect self.filter = '' return False finally: self.Scroll(-1, 0) self.SetData() retur...
444,906
def SetData(self, data): if DEBUG: print >> sys.stderr, "ListBody: new data", time() self.raw_data = data diff = time() - self.lastData if diff > LIST_RATE_LIMIT: self.__SetData() self.lastData = time() else: wx.CallLater(int(diff * 1000), self.__SetData) self.lastData = self.lastData + LIST_RATE_LIMIT #apply quickfi...
def SetData(self, data = None): if DEBUG: print >> sys.stderr, "ListBody: new data", time() self.raw_data = data diff = time() - self.lastData if diff > LIST_RATE_LIMIT: self.__SetData() self.lastData = time() else: wx.CallLater(int(diff * 1000), self.__SetData) self.lastData = self.lastData + LIST_RATE_LIMIT #apply ...
444,907
def SetData(self, data): if DEBUG: print >> sys.stderr, "ListBody: new data", time() self.raw_data = data diff = time() - self.lastData if diff > LIST_RATE_LIMIT: self.__SetData() self.lastData = time() else: wx.CallLater(int(diff * 1000), self.__SetData) self.lastData = self.lastData + LIST_RATE_LIMIT #apply quickfi...
def SetData(self, data): if DEBUG: print >> sys.stderr, "ListBody: new data", time() if data == None: data = self.raw_data else: self.raw_data = data def doSetData(): self.lastData = time() self.dataTimer = None self.__SetData() self.lastData = time() else: wx.CallLater(int(diff * 1000), self.__SetData) self.lastDat...
444,908
def SetData(self, data): if DEBUG: print >> sys.stderr, "ListBody: new data", time() self.raw_data = data diff = time() - self.lastData if diff > LIST_RATE_LIMIT: self.__SetData() self.lastData = time() else: wx.CallLater(int(diff * 1000), self.__SetData) self.lastData = self.lastData + LIST_RATE_LIMIT #apply quickfi...
def SetData(self, data): if DEBUG: print >> sys.stderr, "ListBody: new data", time() self.raw_data = data diff = time() - self.lastData if diff > LIST_RATE_LIMIT: self.__SetData() diff = time() - (LIST_RATE_LIMIT + self.lastData) if diff > 0: doSetData() else: call_in = -diff * 1000 if self.dataTimer == None: self.da...
444,909
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_BATCH_SIZE: self.ShowM...
444,910
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, self.raw_data) else: data = self.raw_data self.vSizer.ShowItems(False) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(d...
444,911
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
444,912
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
def __SetData(self): if DEBUG: print >> sys.stderr, "ListBody: set data", time() data = self.raw_data #apply quickfilter if self.filter != '': data = filter(self.MatchFilter, data) self.parent_list.SetFilteredResults(len(data)) self.vSizer.Clear() if data: if len(self.items) == 0: #new data if len(data) > LIST_ITEM_B...
444,913
def __init__(self, parent, utility, vlcwrap, bg, border = True): wx.Panel.__init__(self, parent, -1) self.utility = utility self.parent = parent self.border = border self.SetBackgroundColour(wx.WHITE) self.volume = 0.48 self.oldvolume = 0.48 self.estduration = None
def self.vlcwrap = vlcwrap __init__(self, self.vlcwrap = vlcwrap parent, self.vlcwrap = vlcwrap utility, self.vlcwrap = vlcwrap vlcwrap, self.vlcwrap = vlcwrap bg, self.vlcwrap = vlcwrap border self.vlcwrap = vlcwrap = self.vlcwrap = vlcwrap True): self.vlcwrap = vlcwrap wx.Panel.__init__(self, self.vlcwrap = vlcwrap p...
444,914
def __init__(self, parent, utility, vlcwrap, bg, border = True): wx.Panel.__init__(self, parent, -1) self.utility = utility self.parent = parent self.border = border self.SetBackgroundColour(wx.WHITE) self.volume = 0.48 self.oldvolume = 0.48 self.estduration = None
def __init__(self, parent, utility, vlcwrap, bg, border = True): wx.Panel.__init__(self, parent, -1) self.utility = utility self.parent = parent self.border = border self.SetBackgroundColour(wx.WHITE) self.volume = 0.48 self.oldvolume = 0.48 self.estduration = None
444,915
def __init__(self): if NetworkBuzzDBHandler.__single is not None: raise RuntimeError, "NetworkBuzzDBHandler is singleton" NetworkBuzzDBHandler.__single = self db = SQLiteCacheDB.getInstance() BasicDBHandler.__init__(self,db, 'TermFrequency') from Tribler.Core.Tag.Extraction import TermExtraction self.extractor = TermE...
def __init__(self): if NetworkBuzzDBHandler.__single is not None: raise RuntimeError, "NetworkBuzzDBHandler is singleton" NetworkBuzzDBHandler.__single = self db = SQLiteCacheDB.getInstance() BasicDBHandler.__init__(self,db, 'TermFrequency') from Tribler.Core.Tag.Extraction import TermExtraction self.extractor = TermE...
444,916
def __init__(self): if NetworkBuzzDBHandler.__single is not None: raise RuntimeError, "NetworkBuzzDBHandler is singleton" NetworkBuzzDBHandler.__single = self db = SQLiteCacheDB.getInstance() BasicDBHandler.__init__(self,db, 'TermFrequency') from Tribler.Core.Tag.Extraction import TermExtraction self.extractor = TermE...
def __init__(self): if NetworkBuzzDBHandler.__single is not None: raise RuntimeError, "NetworkBuzzDBHandler is singleton" NetworkBuzzDBHandler.__single = self db = SQLiteCacheDB.getInstance() BasicDBHandler.__init__(self,db, 'TermFrequency') from Tribler.Core.Tag.Extraction import TermExtraction self.extractor = TermE...
444,917
def getBuzzForTable(self, table, size, with_freq=True, max_freq=None): """ Retrieves a sample of high, medium and low frequent terms or phrases, paired with their frequencies, depending on the table to be sampled from. @table Table to retrieve the highest frequency from. Must be a key in NetworkBuzzDBHandler.TABLES. @...
def getBuzzForTable(self, table, size, with_freq=True, max_freq=None): """ Retrieves a sample of high, medium and low frequent terms or phrases, paired with their frequencies, depending on the table to be sampled from. @table Table to retrieve the highest frequency from. Must be a key in NetworkBuzzDBHandler.TABLES. @...
444,918
def download_torrent(self,permid,infohash,usercallback, prio = 1): """ The user has selected a torrent referred to by a peer in a query reply. Try to obtain the actual .torrent file from the peer and then start the actual download. """ assert isinstance(infohash, str), "INFOHASH has invalid type: %s" % type(infohash) a...
def download_torrent(self,permid,infohash,usercallback, prio = 1): """ The user has selected a torrent referred to by a peer in a query reply. Try to obtain the actual .torrent file from the peer and then start the actual download. """ assert isinstance(infohash, str), "INFOHASH has invalid type: %s" % type(infohash) a...
444,919
def __init__(self, metadatahandler, overlay_bridge, prio): self.metadatahandler = metadatahandler self.overlay_bridge = overlay_bridge self.prio = prio self.queue = Queue.Queue() self.sources = {} self.doRequest()
def __init__(self, metadatahandler, overlay_bridge, session, prio): self.metadatahandler = metadatahandler self.overlay_bridge = overlay_bridge self.prio = prio self.queue = Queue.Queue() self.sources = {} self.doRequest()
444,920
def _PostInit(self): if DEBUG: print >> sys.stderr, "TopSearchPanel: OnCreate" bgPanel._PostInit(self) self.SetBackgroundColour(wx.Colour(255, 255, 255)) """ if sys.platform == 'linux2': #bug in linux for searchctrl, focus does not hide search text + text stays grey self.searchField = wx.TextCtrl(self, -1, "", style...
def _PostInit(self): if DEBUG: print >> sys.stderr, "TopSearchPanel: OnCreate" bgPanel._PostInit(self) self.SetBackgroundColour(wx.Colour(255, 255, 255)) """ if sys.platform == 'linux2': #bug in linux for searchctrl, focus does not hide search text + text stays grey self.searchField = wx.TextCtrl(self, -1, "", style...
444,921
def storeKeywordsByID(self, peer_id, torrent_id, term_ids, commit=True): sql_insert_search = u"INSERT INTO ClicklogSearch (peer_id, torrent_id, term_id, term_order) values (?, ?, ?, ?)" if len(term_ids)>MAX_KEYWORDS_STORED: term_ids= term_ids[0:MAX_KEYWORDS_STORED]
def old_term_ids = self.getTorrentSearchTerms(torrent_id, peer_id) sql_update_term_popularity= u"UPDATE ClicklogTerm SET times_seen = times_seen-1 WHERE term_id=?" self._db.executemany(sql_update_term_popularity, old_term_ids, commit=commit) self._db.execute_write("DELETE FROM ClicklogSearch WHERE peer_id=? AND torr...
444,922
def __init__(self,guiUtility): if TorrentManager.__single: raise RuntimeError, "TorrentSearchGridManager is singleton" TorrentManager.__single = self self.guiUtility = guiUtility # Contains all matches for keywords in DB, not filtered by category self.hits = [] # Remote results for current keywords self.remoteHits = ...
def self.dslist = [] __init__(self,guiUtility): self.dslist = [] if self.dslist = [] TorrentManager.__single: self.dslist = [] raise self.dslist = [] RuntimeError, self.dslist = [] "TorrentSearchGridManager self.dslist = [] is self.dslist = [] singleton" self.dslist = [] TorrentManager.__sing...
444,923
torrentdef = TorrentDef.load(abs_filename)
torrentdef = TorrentDef.load(abs_filename)
444,924
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems()] addresses.sort()
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems()] addresses.sort()
444,925
def isCrawler(self, permid): """ @param permid The permid of the sending peer. @return Whether of not the specified permid is a superpeer. """ return permid in self.session.lm.crawler_db.getCrawlers()
def isCrawler(self, permid): """ @param permid The permid of the sending peer. @return Whether of not the specified permid is a crawler. """ return permid in self.session.lm.crawler_db.getCrawlers()
444,926
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems()] addresses.sort()
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems() if timestamp + 60 > now] addresses.sort()
444,927
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems()] addresses.sort()
def _create_connections(self): # order by last connection attempt addresses = [(timestamp, address) for address, timestamp in self._potential_peers.iteritems()] addresses.sort()
444,928
def handle_info_crawler_request(self, permid, selversion, channel_id, message, reply_callback): pass
def handle_info_crawler_request(self, permid, selversion, channel_id, message, reply_callback): pass
444,929
def _after_event_request_callback(self, exc, permid): """ <<Crawler-side>> Called by the Crawler with the result of the request_callback call in the handle_crawler_reply method. """ if not exc: if DEBUG: print >>sys.stderr, "videoplaybackcrawler: request send to", show_permid_short(permid) self._file.write("; ".join((s...
def _after_event_request_callback(self, exc, permid): """ <<Crawler-side>> Called by the Crawler with the result of the request_callback call in the handle_crawler_reply method. """ if not exc: if DEBUG: print >>sys.stderr, "videoplaybackcrawler: request send to", show_permid_short(permid) self._file.write("; ".join((s...
444,930
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
444,931
def AddDataset(self, evt): # Run Add Dataset wizard add_dataset = AddDatasetWizard(self.Parent, -1, 'Add Dataset') if add_dataset.RunWizard(add_dataset.page[0]): dataset_url = add_dataset.url.GetValue() dbname = add_dataset.dbname.GetValue() tablename = add_dataset.tablename.GetValue() if not tablename: tablename = dbn...
def AddDataset(self, evt): # Run Add Dataset wizard add_dataset = AddDatasetWizard(self.Parent, -1, 'Add Dataset') if add_dataset.RunWizard(add_dataset.page[0]): dataset_url = add_dataset.url.GetValue() dbname = add_dataset.dbname.GetValue() tablename = add_dataset.tablename.GetValue() if not tablename: tablename = dbn...
444,932
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
444,933
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + " . . .") if self.table.delimiter == "\t": fmt = "TabDelimited" e...
444,934
def download(self, engine=None): # Variables to get text file/create database engine = self.checkengine(engine) RAW_DATA_LOCATION = "raw_data2" db = Database() db.dbname = "AvianBodyMass" engine.db = db engine.get_cursor() engine.create_db() table = Table() table.tablename = "mass" table.delimiter = ",," table.clean...
def download(self, engine=None): # Variables to get text file/create database engine = self.checkengine(engine) db = Database() db.dbname = "AvianBodyMass" engine.db = db engine.get_cursor() engine.create_db() table = Table() table.tablename = "mass" table.delimiter = ",," table.cleanup = Cleanup(no_cleanup, None) #...
444,935
def download(self, engine=None): DbTk.download(self, engine) for key in self.urls.keys(): if not key in self.tables.keys(): self.tables[key] = Table(key, cleanup=Cleanup(correct_invalid_value, nulls=[-999])) for key, value in self.urls.items(): self.engine.auto_create_table(self.tables[key], url=value) self.engine.in...
def download(self, engine=None): DbTk.download(self, engine) for key in self.urls.keys(): if not key in self.tables.keys(): self.tables[key] = Table(key, cleanup=Cleanup(correct_invalid_value, nulls=[-999])) for key, value in self.urls.items(): self.engine.auto_create_table(self.tables[key], url=value) self.engine.in...
444,936
def convert_data_type(engine, datatype): """Converts DBTK generic data types to db engine specific data types""" datatypes = dict() datatypes["pk"], datatypes["int"], datatypes["double"], datatypes["char"], datatypes["bit"] = range(5) datatypes["combine"], datatypes["skip"] = [-1, -1] dbdatatypes = dict() dbdatatypes["...
def convert_data_type(engine, datatype): """Converts DBTK generic data types to db engine specific data types""" datatypes = dict() datatypes["pk"], datatypes["int"], datatypes["double"], datatypes["char"], datatypes["bit"] = range(5) datatypes["combine"], datatypes["skip"] = [-1, -1] dbdatatypes = dict() dbdatatypes["...
444,937
def get_cursor_mysql(db): """Get login information for MySQL database""" import MySQLdb as dbapi # If any parameters are missing, input them manually if db.opts["username"] == "": db.opts["username"] = raw_input("Enter your MySQL username: ") if db.opts["password"] == "": db.opts["password"] = getpass.getpass("Enter y...
def get_cursor_mysql(db): """Get login information for MySQL database""" import MySQLdb as dbapi # If any parameters are missing, input them manually if db.opts["username"] == "": db.opts["username"] = raw_input("Enter your MySQL username: ") if db.opts["password"] == "": print "Enter your MySQL password: " db.opts["p...
444,938
def extract_values(self, line): if self.table.fixedwidth: pos = 0 values = [] for width in self.table.fixedwidth: values.append(line[pos:pos+width].strip()) pos += width print values return values else: return line.split(self.table.delimiter)
def extract_values(self, line): if self.table.fixedwidth: pos = 0 values = [] for width in self.table.fixedwidth: values.append(line[pos:pos+width].strip()) pos += width return values else: return line.split(self.table.delimiter)
444,939
def get_cursor(self): """Gets the db connection and cursor.""" import sqlite3 as dbapi self.get_input() self.connection = dbapi.connect(self.opts["file"]) self.cursor = self.connection.cursor()
def get_cursor(self): """Gets the db connection and cursor.""" import sqlite3 as dbapi self.get_input() self.connection = dbapi.connect(self.opts["file"]) self.cursor = self.connection.cursor()
444,940
def __init__(self, parent, id, txt="", size=(-1,-1), style=None): wx.TextCtrl.__init__(self, parent, id, txt, size=size, style=0) self.SetForegroundColour(wx.BLACK) self.SetBackgroundColour(wx.WHITE)
def __init__(self, parent, id, txt="", size=(-1,-1), style=0): wx.TextCtrl.__init__(self, parent, id, txt, size=size, style=style) self.SetForegroundColour(wx.BLACK) self.SetBackgroundColour(wx.WHITE)
444,941
def emptyvaltonull(datain): """Convert empty fields in comma delimited text to MySQL NULL indicator /N Keyword arguments: datain = a list of strings where each string is one line of the datafile """ # TO DO - test new implementation # TO DO - add ability to select delimiter other than commas dataout = []; line = dat...
def emptyvaltonull(datain): """Convert empty fields in comma delimited text to MySQL NULL indicator /N Keyword arguments: datain = a list of strings where each string is one line of the datafile """ # TO DO - test new implementation # TO DO - add ability to select delimiter other than commas dataout = []; line = dat...
444,942
def checkengine(self, engine=None): if not engine: opts = get_opts() engine = choose_engine(opts) engine.script = self return engine
def checkengine(self, engine=None): if not engine: opts = get_opts() engine = choose_engine(opts) engine.script = self return engine
444,943
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
444,944
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
444,945
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
444,946
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,947
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,948
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,949
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,950
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,951
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,952
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,953
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,954
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,955
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,956
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,957
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,958
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,959
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,960
def empty(cell): return cell.ctype == 0
def empty(cell): return cell.ctype == 0
444,961
def insert_data_from_file(self, filename): """Calls MySQL "LOAD DATA LOCAL INFILE" statement to perform a bulk insert.""" if self.table.cleanup.function == no_cleanup: print ("Inserting data from " + os.path.basename(filename) + " . . .") columns = self.get_insert_columns() statement = """
def insert_data_from_file(self, filename): """Calls MySQL "LOAD DATA LOCAL INFILE" statement to perform a bulk insert.""" if self.table.cleanup.function == no_cleanup: print ("Inserting data from " + os.path.basename(filename) + " . . .") columns = self.get_insert_columns() statement = """
444,962
def create_table(db, table): """Creates a database based on settings supplied in dbinfo object""" warnings.filterwarnings("ignore") # Connect to the database if db.engine == "postgresql": object = "SCHEMA" else: object = "DATABASE" if db.drop: db.cursor.execute(drop_statement(db.engine, object, db.dbname)) db.cursor....
def create_table(db, table): """Creates a database based on settings supplied in dbinfo object""" warnings.filterwarnings("ignore") # Connect to the database if db.engine == "postgresql": object = "SCHEMA" else: object = "DATABASE" if db.drop: db.cursor.execute(drop_statement(db.engine, object, db.dbname)) db.cursor....
444,963
def create_table(db, table): """Creates a database based on settings supplied in dbinfo object""" warnings.filterwarnings("ignore") # Connect to the database if db.engine == "postgresql": object = "SCHEMA" else: object = "DATABASE" if db.drop: db.cursor.execute(drop_statement(db.engine, object, db.dbname)) db.cursor....
def create_table(db, table): """Creates a database based on settings supplied in dbinfo object""" warnings.filterwarnings("ignore") # Connect to the database if db.engine == "postgresql": object = "SCHEMA" else: object = "DATABASE" if db.drop: db.cursor.execute(drop_statement(db.engine, object, db.dbname)) db.cursor....
444,964
def convert_data_type(engine, datatype): datatypes = dict() datatypes["pk"], datatypes["int"], datatypes["double"], datatypes["char"], datatypes["bit"] = range(5) datatypes["combine"], datatypes["skip"] = [-1, -1] dbdatatypes = dict() dbdatatypes["mysql"] = ["INT(5) NOT NULL AUTO_INCREMENT", "INT(%s)", "DOUBLE", "VARCH...
def convert_data_type(engine, datatype): datatypes = dict() datatypes["pk"], datatypes["int"], datatypes["double"], datatypes["char"], datatypes["bit"] = range(5) datatypes["combine"], datatypes["skip"] = [-1, -1] dbdatatypes = dict() dbdatatypes["mysql"] = ["INT(5) NOT NULL AUTO_INCREMENT", "INT(%s)", "DOUBLE", "VARCH...
444,965
def get_cursor_mysql(): """Get login information for MySQL/PostgreSQL database""" import MySQLdb as dbapi username = "" password = "" hostname = "" sqlport = 0 # Check for command line arguments try: opts, args = getopt.getopt(sys.argv[1:], "u:p:ho", ["user=", "password=", "host=", "port="]) for opt, arg in opts: if ...
def get_cursor_mysql(): """Get login information for MySQL database""" import MySQLdb as dbapi username = "" password = "" hostname = "" sqlport = 0 # Check for command line arguments try: opts, args = getopt.getopt(sys.argv[1:], "u:p:ho", ["user=", "password=", "host=", "port="]) for opt, arg in opts: if opt in ("-u...
444,966
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "\n<p><font color='green'>" + s.split(':')[0] + "</font></p>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Par...
444,967
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=100, parent=self.Parent, st...
444,968
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
444,969
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
def write(self, s): if '\b' in s: s = s.replace('\b', '') if not self.dialog: self.html += "<font color='green'>" + s.split(':')[0] + "</font>" self.refresh_html() wx.GetApp().Yield() self.dialog = wx.ProgressDialog("Download Progress", "Downloading datasets . . .\n" + " " * len(s), maximum=2, parent=self.Parent, styl...
444,970
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.sizer.Add(self.checkallbox) self.checkallbox.Bind(wx.EVT_CHECKBOX, self.CheckAll) # CheckListBox of scripts lists = [list.name for list in parent.lists] se...
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.sizer.Add(self.checkallbox) self.checkallbox.Bind(wx.EVT_CHECKBOX, self.CheckAll) # CheckListBox of scripts lists = [list.name for list in parent.lists] se...
444,971
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.sizer.Add(self.checkallbox) self.checkallbox.Bind(wx.EVT_CHECKBOX, self.CheckAll) # CheckListBox of scripts lists = [list.name for list in parent.lists] se...
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.sizer.Add(self.checkallbox) self.checkallbox.Bind(wx.EVT_CHECKBOX, self.CheckAll) # CheckListBox of scripts lists = [list.name for list in parent.lists] se...
444,972
def CheckAll(self, evt): if self.checkallbox.GetValue(): self.catlist.SetCheckedStrings([list.name for list in self.Parent.lists]) else: self.catlist.SetCheckedStrings([])
def CheckAll(self, evt): if self.checkallbox.GetValue(): self.catlist.SetCheckedStrings([list.name for list in self.Parent.lists]) else: self.catlist.SetCheckedStrings([])
444,973
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # Check that at least one dataset is selected before proceeding self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.CheckValues) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.checkallbox.SetValue(True) ...
def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # Check that at least one dataset is selected before proceeding self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.CheckValues) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.checkallbox.SetValue(True) ...
444,974
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list
444,975
def update(self, evt): self.timer.Stop() if self.worker: self.worker.output_lock.acquire() while len(self.worker.output) > 0: self.write(self.worker.output[0]) self.worker.output = self.worker.output[1:] self.gauge.SetValue(100 * ((self.worker.scriptnum) / (self.worker.progress_max + 1.0))) if not self.worker.finished(...
def update(self, evt): self.timer.Stop() if self.worker: self.worker.output_lock.acquire() while len(self.worker.output) > 0: if self.write(self.worker.output[0]) == False: terminate = True self.worker.output = self.worker.output[1:] self.gauge.SetValue(100 * ((self.worker.scriptnum) / (self.worker.progress_max + 1.0))...
444,976
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) progress = int((current / total) * 100) if progress < 1: return 1 else: return progress else: return None
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) progress = int((current / total) * 100) if progress < 1: return 1 else: return progress else: return None
444,977
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and not self.table.fixed_width and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + "...") if self.table.delimiter == ...
def insert_data_from_file(self, filename): """Perform a bulk insert.""" if (self.table.cleanup.function == no_cleanup and not self.table.fixed_width and self.table.header_rows < 2) and (self.table.delimiter in ["\t", ","]): print ("Inserting data from " + os.path.basename(filename) + "...") if self.table.delimiter == ...
444,978
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) progress = int((current / total) * 100) if progress < 1: return 1 else: return progress else: return None
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) progress = int((current / total) * 100) if progress < 1: return 1 else: return progress else: return None
444,979
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) return int((current / total) * 100) else: return None
def progress(s): if ' / ' in s: s = s.split(' / ') total = float(s[1]) current = float(s[0].split(': ')[1]) progress = int((current / total) * 100) if progress < 1: return 1 else: return progress else: return None
444,980
def write(self, s): txt = s.strip().translate(None, "\b") if txt: (keepgoing, skip) = dialog.Update(scriptnum - 1, msg + "\n" + txt) if not keepgoing: raise UserAborted if skip: raise UserSkipped
def write(self, s): txt = s.strip().translate(None, "\b") if txt: (keepgoing, skip) = dialog.Update(scriptnum - 1, msg + "\n" + txt) if not keepgoing: raise UserAborted if skip: raise UserSkipped
444,981
def __init__(self, parent, id, label): wx.CheckBox.__init__(self, parent, id, label) self.SetForegroundColour(wx.BLACK) self.SetBackgroundColour(wx.WHITE)
def __init__(self, parent, id, label): wx.CheckBox.__init__(self, parent, id, label) self.SetForegroundColour(wx.BLACK) self.SetBackgroundColour(parent.Parent.bgcolor)
444,982
def download(self, engine=None): DbTk.download(self, engine) self.engine.download_file(self.urls[0][1], "all_Excel.zip") local_zip = zipfile.ZipFile(self.engine.format_filename("all_Excel.zip")) filelist = local_zip.namelist() local_zip.close() self.engine.download_files_from_archive(self.urls[0][0], filelist) fileli...
def download(self, engine=None): DbTk.download(self, engine) self.engine.download_file(self.urls[0][1], "all_Excel.zip") local_zip = zipfile.ZipFile(self.engine.format_filename("all_Excel.zip")) filelist = local_zip.namelist() local_zip.close() self.engine.download_files_from_archive(self.urls[0][1], filelist) fileli...
444,983
def more_recent(latest, current): """Given two version number strings, returns True if the first is more recent.""" latest_parts = latest.split('.') current_parts = current.split('.') for n in range(len(latest_parts)): l = int(latest_parts[n]) c = int(current_parts[n]) if l > c: return True elif c > l: return False ret...
def more_recent(latest, current): """Given two version number strings, returns True if the first is more recent.""" latest_parts = latest.split('.') current_parts = current.split('.') for n in range(len(latest_parts)): l = int(latest_parts[n]) c = int(current_parts[n]) if l > c: return True elif c > l: return False ret...
444,984
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
444,985
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in ...
444,986
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in dbtk_list if not script.public a...
444,987
def write(self, s): txt = s.strip().translate(None, "\b") if txt: (keepgoing, skip) = dialog.Update(scriptnum - 1, msg + "\n" + txt) if not keepgoing: raise UserAborted if skip: raise UserSkipped
def write(self, s): txt = s.strip().translate(None, "\b") if txt: prog = scriptnum - 1 if prog < 0: prog = 0 (keepgoing, skip) = dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted if skip: raise UserSkipped
444,988
def write(self, s): txt = s.strip().translate(None, "\b") if txt: (keepgoing, skip) = dialog.Update(scriptnum - 1, msg + "\n" + txt) if not keepgoing: raise UserAborted if skip: raise UserSkipped
def msg = "Connecting to database:" print "Connecting . . ." write(self, msg = "Connecting to database:" print "Connecting . . ." s): msg = "Connecting to database:" print "Connecting . . ." txt msg = "Connecting to database:" print "Connecting . . ." = msg = "Connecting to database:" print "Connecting . ....
444,989
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
444,990
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
444,991
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
def write(self, s): try: filename = s.split('-')[1] msg = "Downloading " + filename + "..." s = int(s.split('-')[0]) if s < 1: s = 1 (keepgoing, skip) = self.parent.Update(s, msg) if not keepgoing: abort = True except: pass
444,992
def __init__(self): wx.Frame.__init__(self, None, title="") self.progressMax = 100 self.count = 0
defself.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer) self.timer.Start(1) def OnTimer(self, evt): __init__(self):self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer) self.timer.Start(1) def OnTimer(self, evt): wx.Frame.__init__(self,self.timer = wx.Timer(self) self....
444,993
def __init__(self): wx.Frame.__init__(self, None, title="") self.progressMax = 100 self.count = 0
defwx.PD_CAN_SKIP | __init__(self):wx.PD_CAN_SKIP | wx.Frame.__init__(self,wx.PD_CAN_SKIP | None,wx.PD_CAN_SKIP | title="")wx.PD_CAN_SKIP | self.progressMaxwx.PD_CAN_SKIP | =wx.PD_CAN_SKIP | 100wx.PD_CAN_SKIP | self.countwx.PD_CAN_SKIP | =wx.PD_CAN_SKIP | 0
444,994
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 btn_skip = False (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: # wx.MessageBox("SKIP") # raise UserSkipped
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: # wx.MessageBox("SKIP") # raise UserSkipped
444,995
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 btn_skip = False (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: # wx.MessageBox("SKIP") # raise UserSkipped
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 btn_skip = False (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: #if skip: wx.MessageBox("SKIP") raise UserSkipped wx.MessageBox("SKIP") #if skip: wx.M...
444,996
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 btn_skip = False (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: # wx.MessageBox("SKIP") # raise UserSkipped
def write(self, s): txt = s.strip().replace("\b", "") if txt: prog = scriptnum if prog < 1: prog = 1 btn_skip = False (keepgoing, skip) = self.frame.dialog.Update(prog, msg + "\n" + txt) if not keepgoing: raise UserAborted #if skip: # wx.MessageBox("SKIP") # raise UserSkipped
444,997
def AddDataset(self, evt): add_dataset = self.Parent.AddDatasetWizard(self.Parent, -1, 'Add Dataset') if add_dataset.RunWizard(add_dataset.page[0]): dataset_url = add_dataset.url.GetValue() dbname = add_dataset.dbname.GetValue() tablename = add_dataset.tablename.GetValue() fullname = dbname if tablename: fullname += "....
def AddDataset(self, evt): add_dataset = AddDatasetWizard(self.Parent, -1, 'Add Dataset') if add_dataset.RunWizard(add_dataset.page[0]): dataset_url = add_dataset.url.GetValue() dbname = add_dataset.dbname.GetValue() tablename = add_dataset.tablename.GetValue() fullname = dbname if tablename: fullname += "." + tablenam...
444,998
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in self.Parent.dbtk_list if not scr...
def CheckValues(self, evt): """Users can't continue from this page without checking at least one dataset.""" if len(self.scriptlist.GetCheckedStrings()) == 0 and evt.Direction: evt.Veto() elif evt.Direction: checked = self.scriptlist.GetCheckedStrings() warn = [script.name for script in self.Parent.dbtk_list if not scr...
444,999