rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
majorVersion = version | if len(versionData) == 3: majorVersion = versionData[0] minorVersion = versionData[1] releaseVersion = versionData[2] else: majorVersion = version | def _getVersionInfo(buildenv): majorVersion = '' minorVersion = '' releaseVersion = '' versionFilename = 'version.py' versionFile = open(versionFilename, 'r') lines = versionFile.readlines() versionFile.close() data = {} for line in lines: line = line.lstrip() if not line.startswith('#'): linedata = line.spl... |
self.Bind( wx.colheader.EVT_COLUMNHEADER_SELCHANGED, self.OnColumnHeaderClick, ch1 ) | self.Bind( wx.colheader.EVT_COLUMNHEADER_SELCHANGED, self.OnClickColumnHeader, ch1 ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.colheader.EVT_COLUMNHEADER_SELCHANGED, self.OnColumnHeaderClick, ch2 ) | self.Bind( wx.colheader.EVT_COLUMNHEADER_SELCHANGED, self.OnClickColumnHeader, ch2 ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
l0O = wx.StaticText( self, -1, "Last Action", (10, miscControlsY + 25), (150, 20) ) l0 = wx.StaticText( self, -1, "[result]", (10, miscControlsY + 45), (150, 20) ) self.l0 = l0 | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log | |
l1 = wx.StaticText( self, -1, prompt, (10, miscControlsY + 85), (150, 20) ) | l1 = wx.StaticText( self, -1, prompt, (10, miscControlsY + 25), (150, 20) ) l0O = wx.StaticText( self, -1, "Last Action:", (10, miscControlsY + 65), (150, 20) ) l0 = wx.StaticText( self, -1, "[result]", (10, miscControlsY + 85), (150, 20) ) self.l0 = l0 | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.EVT_BUTTON, self.OnTestResizeBoundsButton, btn ) | self.Bind( wx.EVT_BUTTON, self.OnButtonTestResizeBounds, btn ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.EVT_BUTTON, self.OnTestDeleteItemButton, btn ) | self.Bind( wx.EVT_BUTTON, self.OnButtonTestDeleteItem, btn ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.EVT_BUTTON, self.OnTestAddBitmapItemButton, btn ) | self.Bind( wx.EVT_BUTTON, self.OnButtonTestAddBitmapItem, btn ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.EVT_BUTTON, self.OnTestResizeDivisionButton, btn ) | self.Bind( wx.EVT_BUTTON, self.OnButtonTestResizeDivision, btn ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
self.Bind( wx.EVT_BUTTON, self.OnTestDeselectButton, btn ) | self.Bind( wx.EVT_BUTTON, self.OnButtonTestDeselect, btn ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log |
def OnColumnHeaderClick( self, event ): | def OnClickColumnHeader( self, event ): | def OnColumnHeaderClick( self, event ): ch = event.GetEventObject() self.l0.SetLabel( "(%d): clicked - selected (%ld)" %(event.GetId(), ch.GetSelectedItem()) ) # self.log.write( "Click! (%ld)\n" % event.GetEventType() ) |
def OnTestResizeBoundsButton( self, event ): | def OnButtonTestResizeBounds( self, event ): | def OnTestResizeBoundsButton( self, event ): if (self.stepSize == 1): self.stepDir = (-1) else: if (self.stepSize == (-1)): self.stepDir = 1 self.stepSize = self.stepSize + self.stepDir ch = self.ch1 newSize = self.baseWidth1 + 40 * self.stepSize ch.DoSetSize( self.colStartX, self.colStartY + 20, newSize, 20, 0 ) self.... |
self.l0.SetLabel( "(%d): resized bounds to %d" %(ch.GetId(), newSize) ) def OnTestDeleteItemButton( self, event ): | ch = self.ch2 newSize = self.baseWidth2 + 40 * self.stepSize ch.DoSetSize( self.colStartX, self.colStartY + 100, newSize, 20, 0 ) self.l0.SetLabel( "(both): resized bounds by (%d)" %(40 * self.stepSize) ) def OnButtonTestDeleteItem( self, event ): | def OnTestResizeBoundsButton( self, event ): if (self.stepSize == 1): self.stepDir = (-1) else: if (self.stepSize == (-1)): self.stepDir = 1 self.stepSize = self.stepSize + self.stepDir ch = self.ch1 newSize = self.baseWidth1 + 40 * self.stepSize ch.DoSetSize( self.colStartX, self.colStartY + 20, newSize, 20, 0 ) self.... |
def OnTestDeselectButton( self, event ): | def OnButtonTestDeselect( self, event ): | def OnTestDeselectButton( self, event ): self.ch1.SetSelectedItem( -1 ) self.ch2.SetSelectedItem( -1 ) |
def OnTestAddBitmapItemButton( self, event ): | self.l0.SetLabel( "(both): deselected items" ) def OnButtonTestAddBitmapItem( self, event ): | def OnTestDeselectButton( self, event ): self.ch1.SetSelectedItem( -1 ) self.ch2.SetSelectedItem( -1 ) |
def OnTestResizeDivisionButton( self, event ): | def OnButtonTestResizeDivision( self, event ): | def OnTestResizeDivisionButton( self, event ): ch = self.ch2 itemIndex = ch.GetSelectedItem() if ((itemIndex > 0) and (itemIndex < ch.GetItemCount())): curExtent = ch.GetUIExtent( itemIndex ) ch.ResizeDivision( itemIndex, curExtent.x - 5 ) self.l0.SetLabel( "(%d): resized btw. %d and %d" %(ch.GetId(), itemIndex - 1, it... |
locQuery = Query.Query (wx.GetApp().UIRepositoryView.repository, queryString) locQuery.args = [ controlValue ] locQuery.execute () | view = wx.GetApp().UIRepositoryView queryName = 'locationAttributeEditorQuery' locQuery = view.findPath('//Queries/'+queryName) if not locQuery: p = view.findPath('//Queries') k = view.findPath('//Schema/Core/Query') locQuery = Query.Query (queryName, p, k, queryString) print "AE:controlValue", controlValue locQuery.ar... | def onKeyPressed(self, event): """ Handle a Key pressed in the control. """ event.Skip() self.showingTheLabel = False # remember we've edited the value control = event.GetEventObject() controlValue = self.GetControlValue (control) keysTyped = len(controlValue) isDelete = event.m_keyCode == wx.WXK_DELETE or event.m_keyC... |
self.repository.view.refresh(_mergeFunction) def propagateAsynchronousNotifications(self): | def fireAsynchronousNotifications(self): | |
for hour in range(24): if (hour > 0): if (hour == 1): hourString = "am 1" elif (hour == 12): hourString = "pm 12" elif (hour > 12): hourString = str(hour - 12) else: hourString = str(hour) | for hour,hourString in self.GetLocaleHourStrings(range(24)): if hour > 0: | def DrawBackground(self, dc): styles = self.parent self._doDrawingCalculations() |
legendBorderX = self.xOffset + 3 - legendBorderWidth | legendBorderX = self.xOffset + 2 - legendBorderWidth | def DrawBackground(self, dc): styles = self.parent self._doDrawingCalculations() |
legendBorderX, workdayHourEnd * self.hourHeight) | legendBorderX, workdayHourEnd * self.hourHeight + 1) | def DrawBackground(self, dc): styles = self.parent self._doDrawingCalculations() |
(startDay, endDay) = self.GetCurrentDateRange() | def DrawBackground(self, dc): styles = self.parent self._doDrawingCalculations() | |
if startVal <= testVal: | if startVal < testVal: | def mEnd(key): # gets the first item starting after startVal testVal = getattr(view[key], endAttrName) if testVal is None: return 0 # interpret None as positive infinity, thus, a match if useTZ: if startVal <= testVal: return 0 else: if startVal.replace(tzinfo=None) <= testVal.replace(tzinfo=None): return 0 return 1 |
if startVal.replace(tzinfo=None) <= testVal.replace(tzinfo=None): | if startVal.replace(tzinfo=None) < testVal.replace(tzinfo=None): | def mEnd(key): # gets the first item starting after startVal testVal = getattr(view[key], endAttrName) if testVal is None: return 0 # interpret None as positive infinity, thus, a match if useTZ: if startVal <= testVal: return 0 else: if startVal.replace(tzinfo=None) <= testVal.replace(tzinfo=None): return 0 return 1 |
_copyTree(full_name, os.path.join(destdir, name), True, patterns, excludes) | if os.path.islink(full_name): if not os.path.exists(destdir): mkdirs(destdir) os.symlink(os.readlink(full_name), os.path.join(destdir, name)) else: _copyTree(full_name, os.path.join(destdir, name), True, patterns, excludes) | def _copyTree(srcdir, destdir, recursive, patterns, excludes): """ This function implements a directory-tree copy from one place (srcdir) to another (destdir), whether it should be recursive, what file patterns to copy (may be a list), and what file patterns to exclude (may be a list) """ os.chdir(srcdir) # iterate ove... |
startTime = str(startInt) | def main(): prevStartInt = 0 curDir = os.path.abspath(os.getcwd()) if not os.path.exists(outputDir): print "outputDir doesn't exist:", outputDir sys.exit(1) if not os.path.exists(buildDir): os.mkdir(buildDir) path = os.environ.get('PATH', os.environ.get('path')) cvsProgram = hardhatutil.findInPath(path, "cvs") prin... | |
distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib" + os.sep + "win" + os.sep + \ "manifest.debug.win" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) | distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib" + os.sep + "win" + os.sep + "manifest.debug.win" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) | def distribute(buildenv): _createVersionFile(buildenv) buildVersionShort = \ hardhatutil.RemovePunctuation(buildenv['buildVersion']) # When the build version string is based on one of our CVS tags # (which usually begin with "CHANDLER_") let's remove the "CHANDLER_" # prefix from the string so it doesn't end up in t... |
compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) | installSourceFile = hardhatlib.makeInstaller(buildenv, [distName], distName) installSourceFile = os.path.join(installSourceFile, "Setup.exe") installTargetFile = distName compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) | def distribute(buildenv): _createVersionFile(buildenv) buildVersionShort = \ hardhatutil.RemovePunctuation(buildenv['buildVersion']) # When the build version string is based on one of our CVS tags # (which usually begin with "CHANDLER_") let's remove the "CHANDLER_" # prefix from the string so it doesn't end up in t... |
managerKind = self.rep['manager'] assistantManager = managerKind.newItem('assistant', self.rep) | def testDictReferenceAttributes(self): """Test dictionary valued bidirectional references""" (managerKind, employeeKind) = self._createManagerAndEmployeeKinds('dict') | |
assistantManager.employees = [] assistantManager.employees.extend(empClone) print "assistant manager has %d employees" % len(assistantManager.employees) self.assert_(len(assistantManager.employees) == numEmployees) empClone = [] for anEmp in manager.employees: empClone.append(anEmp) assistantManager.employees = [] as... | print "manager has %d employees" % len(manager.employees) manager.employees = empClone print "manager has %d employees" % len(manager.employees) print "manager has %d employee values" % len(manager.employees.values()) | def testDictReferenceAttributes(self): """Test dictionary valued bidirectional references""" (managerKind, employeeKind) = self._createManagerAndEmployeeKinds('dict') |
event.dtstart[0].value = datetime.datetime(d.year, d.month, d.day) recurrenceIter = [event.dtstart[0].value] | recurrenceIter = [datetime.datetime(d.year, d.month, d.day)] | def importProcess(self, text, extension=None, item=None): # the item parameter is so that a share item can be passed in for us # to populate. |
for (reference, copyName, item, attributeName) in self.__copyOperations: | for (reference, copyName, item, attributeName, file, line) in self.__copyOperations: self.saveState(file, line) | def loadParcels(self, namespaces=None): """ Load parcel items into the repository. |
if copy == None: explanation = \ ("Unable to make copy named '%s' for attribute '%s'. " + "Maybe the original was moved/deleted?") % \ (copyName, attributeName) self.saveExplanation(explanation) raise ParcelException(explanation) | def loadParcels(self, namespaces=None): """ Load parcel items into the repository. | |
def addCopyOperation(self, reference, copyName, item, attributeName): self.__copyOperations.append((reference, copyName, item, attributeName)) | def addCopyOperation(self, reference, copyName, item, attributeName, file, line): self.__copyOperations.append((reference, copyName, item, attributeName, file, line)) | def addCopyOperation(self, reference, copyName, item, attributeName): self.__copyOperations.append((reference, copyName, item, attributeName)) |
item, attributeName) | item, attributeName, file, line) | def completeAssignments(self, item, assignments): """ Perform all the delayed attribute assignments for an item """ |
class ChandlerIMAP4Client(imap4.IMAP4Client): | class IMAPException(common.MailException): pass class ChandlerIMAP4Client(imap4.IMAP4Client, policies.TimeoutMixin): timeout = 60 | def NotifyUIAsync (message, logger=logging.info, **keys): logger (message) Globals.wxApplication.CallItemMethodAsync (Globals.mainView, 'setStatusMessage', message, **keys) |
self.serverCapabilities = common.disableTwistedTLS(caps) | self._capCache = common.disableTwistedTLS(caps) else: self._capCache = caps | def serverGreeting(self, caps): """ This method overides C{imap4.IMAP4Client}. |
def clientConnectionFailed(self, connector, reason): NotifyUIAsync (_("Connection failed - reason is %s") % reason, self.log.error) self.deferred.errback(reason) class IMAPException(common.MailException): pass | def clientConnectionFailed(self, connector, err): self._processConnectionError(connector, err) def clientConnectionLost(self, connector, err): self._processConnectionError(connector, err) def _processConnectionError(self, connector, err): self.connectionLost = True if not self.done: if isinstance(err.value, error.C... | def clientConnectionFailed(self, connector, reason): NotifyUIAsync (_("Connection failed - reason is %s") % reason, self.log.error) self.deferred.errback(reason) |
viewName = "%s_%s" % (account.displayName, str(UUID.UUID())) | viewName = "%s_%s_%s" % (account.displayName, str(UUID.UUID()), DateTime.now()) | def __init__(self, account): """ Creates a C{IMAPDownload} instance @param account: An Instance of C{IMAPAccount} @type account: C{IMAPAccount} @return: C{None} """ |
d = defer.Deferred() d.addCallback(self.loginClient) d.addErrback(self.catchErrors) factory = ChandlerIMAP4Factory(d, self.log, useSSL) | d = defer.Deferred().addCallbacks(self.loginClient, self.catchErrors) self.factory = ChandlerIMAP4Factory(d, self.log, useSSL) | def __getMail(self): |
reactor.connectSSL(host, port, factory, ssl.ClientContextFactory(useM2=1)) | reactor.connectSSL(host, port, self.factory, ssl.ClientContextFactory(useM2=1)) | def __getMail(self): |
reactor.connectTCP(host, port, factory) | reactor.connectTCP(host, port, self.factory) | def __getMail(self): |
NotifyUIAsync (_("IMAP error: %s") % error, self.log.error, alert=True) | if __debug__: self.printCurrentView("catchErrors") self._setDone() if not self.factory.connectionLost: self.__disconnect() NotifyUIAsync(_("Error: %s") % error.value, self.log.error, alert=True) """Continue the errback chain""" return error | def catchErrors(self, error): """ This method captures all errors thrown while in the Twisted Reactor Thread. @return: C{None} """ |
).addCallback(self.__selectInbox) | ).addCallbacks(self.__selectInbox, self.catchErrors) | def loginClientInsecure(self, error, username, password): if __debug__: self.printCurrentView("loginClientInsecure") |
NotifyUIAsync (_("Checking Inbox for new mail messages"), self.__printInfo) return self.proto.select("INBOX").addCallback(self.__checkForNewMessages) | NotifyUIAsync(_("Checking Inbox for new mail messages"), self.__printInfo) return self.proto.select("INBOX").addCallbacks(self.__checkForNewMessages, self.catchErrors) | def __selectInbox(self, result): if __debug__: self.printCurrentView("selectInbox ***Could be wrong view***") |
d.addCallback(self.__getMessagesFromUIDS) | d.addCallbacks(self.__getMessagesFromUIDS, self.catchErrors) | def __checkForNewMessages(self, msgs): |
NotifyUIAsync (_("No messages present to download"), self.__printInfo) | else: self._setDone() self.__disconnect() NotifyUIAsync(_("No messages present to download"), self.__printInfo) | def __checkForNewMessages(self, msgs): |
v = [int(v['UID']) for v in msgs.itervalues()] low = min(v) high = max(v) | try: v = [int(v['UID']) for v in msgs.itervalues()] low = min(v) high = max(v) except: str = "The IMAP Server returned invalid information" self.catchErrors(failure.Failure(IMAPException(str))) return | def __getMessagesFromUIDS(self, msgs): |
NotifyUIAsync (_("No new messages found"), self.__printInfo) | self._setDone() self.__disconnect() NotifyUIAsync(_("No new messages found"), self.__printInfo) | def __getMessagesFromUIDS(self, msgs): |
d.addCallback(self.__fetchMessages).addCallback(self.__disconnect) | d.addCallbacks(self.__fetchMessages, self.catchErrors) | def __getMessagesFromUIDS(self, msgs): |
def __disconnect(self, result = None): if __debug__: self.printCurrentView("disconnect") self.proto.close() | def _setDone(self, result=None): if __debug__: self.printCurrentView("_setDone") self.factory.done = True def __disconnect(self, result=None): if __debug__: self.printCurrentView("__disconnect") | def __disconnect(self, result = None): |
self.view.commit() | self.view.refresh() | def __fetchMessages(self, msgs): |
sharingInvitations.values()) | sharingInvitations.values() ).addErrback(self.catchErrors) else: self._setDone() self.__disconnect() | def __fetchMessages(self, msgs): |
rule = "intersect (" + rule + ", for i in '" + kindPath + "' where True)" | rule = "intersect (" + rule + ", for i inevery '" + kindPath + "' where True)" | def calculateQueryStringAndArgs (self): args = {} rule = self._rule if len (self._inclusions): if rule: rule = "union (" + rule + ", for i in $0 where True)" else: rule = "for i in $0 where True" args ["$0"] = (self.itsUUID, "_inclusions") if rule: if len (self._exclusions): rule = "difference (" + rule + ", for i in $... |
hueList = [k/360.0 for k in [210, 120, 60, 0, 240, 90, 330, 30, 180, 270]] | hueList = [k/360.0 for k in [210, 120, 0, 240, 330, 30, 270]] | def __get__(self, inst, cls): if inst is None: return self result = self.method(inst) setattr(inst, self.name, result) return result |
visibleGradientLeft = tintedColor(0.3) visibleGradientRight = tintedColor(0.3) visibleOutlineColor = tintedColor(0.4) visibleTextColor = tintedColor(0.5, 0.95) | visibleGradientLeft = tintedColor(0.15) visibleGradientRight = tintedColor(0.15) visibleOutlineColor = tintedColor(0.3) visibleTextColor = tintedColor(0.4, 0.85) | def demangledTupleGetter(self): return tuple([val.fget(self) for val in args]) |
self.DrawWrappedText(dc, timeString, timeRect) y += self.timeHeight | self.DrawWrappedText(dc, timeString, timeRect) self.timeHeight += 3 y += self.timeHeight + 3 | def Draw(self, dc, styles, brushOffset, selected, rightSideCutOff=False): # @@@ add a general cutoff parameter? item = self._item time = item.startTime isAnyTimeOrAllDay = self.GetAnyTimeOrAllDay() # Draw one event - an event consists of one or more bounds clipRect = None (cx,cy,cwidth,cheight) = dc.GetClippingBox() ... |
smallFont = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, | smallFont = wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL, | def InitializeStyles(self): # This is where all the styles come from if '__WXMAC__' in wx.PlatformInfo: bigFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.NORMAL) bigBoldFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.BOLD) smallFont = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, face="Verdana") smallBoldFont = wx.Font(10, wx.... |
smallFont = wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, | smallFont = wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL, | def InitializeStyles(self): # This is where all the styles come from if '__WXMAC__' in wx.PlatformInfo: bigFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.NORMAL) bigBoldFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.BOLD) smallFont = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, face="Verdana") smallBoldFont = wx.Font(10, wx.... |
self.legendFont = bigFont | self.legendFont = smallFont | def InitializeStyles(self): # This is where all the styles come from if '__WXMAC__' in wx.PlatformInfo: bigFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.NORMAL) bigBoldFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.BOLD) smallFont = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, face="Verdana") smallBoldFont = wx.Font(10, wx.... |
legendBorderWidth = 1 | def onSelectItemBroadcast(self, event): #@@@ untested. doesn't seem to be receiving SIB's correctly print "allday evt cvs receives SIB" self.selection = event.arguments['item'] | |
if hasattr(self, '_dragTimer'): self._dragTimer.Stop() del self._dragTimer | self.StopDragTimer() | def HandleDragEnd(self): if self._dragCanceled: return if self._dragStarted: if hasattr(self, '_dragTimer'): self._dragTimer.Stop() del self._dragTimer self.dragEndHandler() |
self.assertEqual(self.event.getCustomDescription(), "not yet implemented") | self.assertEqual(self.event.getCustomDescription(), "every 2 weeks until 8/1/05") | def testRuleChange(self): self.event.rruleset = self._createRuleSetItem('weekly') # self and an automatically generated backup occurrence should exist self.assertEqual(len(self.event.occurrences), 2) |
if name == "exclude": params["exclude"] = value.split(",") log(buildenv, HARDHAT_MESSAGE, "HardHat", "exclude=" + value) | def handleManifest(buildenv, filename): params = {} params["src"] = None params["dest"] = None params["recursive"] = True params["glob"] = "*" srcdir = buildenv['root'] destdir = buildenv['distdir'] for line in fileinput.input(filename): line = line.strip() if len(line) == 0: continue if line[0:1] == "#": continue l... | |
_copyTree(abspath, copyto, params["recursive"], params["glob"]) | _copyTree(abspath, copyto, params["recursive"], params["glob"], params["exclude"]) | def handleManifest(buildenv, filename): params = {} params["src"] = None params["dest"] = None params["recursive"] = True params["glob"] = "*" srcdir = buildenv['root'] destdir = buildenv['distdir'] for line in fileinput.input(filename): line = line.strip() if len(line) == 0: continue if line[0:1] == "#": continue l... |
def _copyTree(srcdir, destdir, recursive, patterns): | def _copyTree(srcdir, destdir, recursive, patterns, excludes): | def _copyTree(srcdir, destdir, recursive, patterns): os.chdir(srcdir) for pattern in patterns: matches = glob.glob(pattern) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) if os.path.islink(match): linkto = os.readlink(match) os.symlink(linkto, os.path.join(destdir,match... |
if os.path.isfile(match): | if os.path.isfile(match) and not match in excludes: | def _copyTree(srcdir, destdir, recursive, patterns): os.chdir(srcdir) for pattern in patterns: matches = glob.glob(pattern) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) if os.path.islink(match): linkto = os.readlink(match) os.symlink(linkto, os.path.join(destdir,match... |
if os.path.isdir(full_name): | if os.path.isdir(full_name) and not name in excludes: | def _copyTree(srcdir, destdir, recursive, patterns): os.chdir(srcdir) for pattern in patterns: matches = glob.glob(pattern) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) if os.path.islink(match): linkto = os.readlink(match) os.symlink(linkto, os.path.join(destdir,match... |
patterns) | patterns, excludes) | def _copyTree(srcdir, destdir, recursive, patterns): os.chdir(srcdir) for pattern in patterns: matches = glob.glob(pattern) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) if os.path.islink(match): linkto = os.readlink(match) os.symlink(linkto, os.path.join(destdir,match... |
def copyTree(srcdir, destdir, patterns): | def copyTree(srcdir, destdir, patterns, excludes): | def copyTree(srcdir, destdir, patterns): for pattern in patterns: matches = glob.glob(os.path.join(srcdir, pattern)) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) shutil.copy(match, destdir) for name in os.listdir(srcdir): fullpath = os.path.join(srcdir, name) if os.pa... |
if os.path.isfile(match): | if os.path.isfile(match) and not match in excludes: | def copyTree(srcdir, destdir, patterns): for pattern in patterns: matches = glob.glob(os.path.join(srcdir, pattern)) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) shutil.copy(match, destdir) for name in os.listdir(srcdir): fullpath = os.path.join(srcdir, name) if os.pa... |
if os.path.isdir(fullpath): copyTree(fullpath, os.path.join(destdir, name), patterns) | if os.path.isdir(fullpath) and not name in excludes: copyTree(fullpath, os.path.join(destdir, name), patterns, excludes) | def copyTree(srcdir, destdir, patterns): for pattern in patterns: matches = glob.glob(os.path.join(srcdir, pattern)) for match in matches: if os.path.isfile(match): if not os.path.exists(destdir): _mkdirs(destdir) shutil.copy(match, destdir) for name in os.listdir(srcdir): fullpath = os.path.join(srcdir, name) if os.pa... |
event = Globals.repository.findPath('//parcels/osaf/framework/blocks/Events/SelectionChanged') event.Post({'item':item, 'type':'Normal'}) | self.blockItem.Post (Globals.repository.findPath('//parcels/osaf/framework/blocks/Events/SelectionChanged'), {'item':item}) | def OnLinkClicked(self, wx_linkinfo): """ Clicking on an item changes the selection (post notification). Clicking on a URL loads the page in a separate browser. """ itemURL = wx_linkinfo.GetHref() item = Globals.repository.findPath(itemURL) if not item: webbrowser.open(itemURL) else: event = Globals.repository.findPath... |
self.File = open(filepath, 'a') | self.File = open(filepath, 'w') | def __init__(self,filepath=None,description="No description"): self.startDate = datetime.now() if filepath: self.inTerminal = False time_stamp = "%4s%2s%2s%2s%2s%2s" %(self.startDate.year, self.startDate.month, self.startDate.day, self.startDate.hour, self.startDate.minute, self.startDate.second) time_stamp = string.re... |
location = self.getLocation() | def _get(self, updateCallback=None): self.connect() | |
return | return stats if updateCallback and updateCallback(msg=_(u"Fetching: '%s'") % location): raise SharingError(_(u"Cancelled by user")) | def _get(self, updateCallback=None): self.connect() |
def deleteItem(item): | def deleteItem(collection): | def deleteItem(item): |
if (shouldClearCollection and isinstance(item, AbstractCollection)): self.ClearCollectionContents(item) | if isinstance(collection, AbstractCollection): if (shouldClearCollection): self.ClearCollectionContents(collection) sharing.unsubscribe(collection) | def deleteItem(item): |
block = self.parentBlock while block is not None and not block.eventBoundary: block = block.parentBlock if block: | block = self while block is not None: | def show (self, shouldShow): # if the show status has changed, tell our widget, and return True try: widget = self.widget except AttributeError: return False if shouldShow == widget.IsShown(): return False widget.Show(shouldShow) self.isShown = shouldShow #logger.debug("%s: now %s", debugName(self), #shouldShow and "v... |
if isinstance(value, class_type): self.__dict__[name] = value.this if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown del value.thisown | if type(value).__name__ == 'PySwigObject': self.__dict__[name] = value | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "this"): if isinstance(value, class_type): self.__dict__[name] = value.this if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown del value.thisown return method = class_type.__swig_setmethods__.get(name,None) if method: retu... |
if (not static) or hasattr(self,name) or (name == "thisown"): | if (not static) or hasattr(self,name): | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "this"): if isinstance(value, class_type): self.__dict__[name] = value.this if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown del value.thisown return method = class_type.__swig_setmethods__.get(name,None) if method: retu... |
if hasattr(self,name) or (name in ("this", "thisown")): | if (name == "thisown"): return self.this.own(value) if hasattr(self,name) or (name == "this"): | def set_attr(self,name,value): if hasattr(self,name) or (name in ("this", "thisown")): set(self,name,value) else: raise AttributeError("You cannot add attributes to %s" % self) |
def __repr__(self): return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args, **kwargs): | def __repr__(self): return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
newobj = _animate.new_AnimationPlayer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_animate.delete_AnimationPlayer): """__del__(self)""" try: if self.thisown: destroy(self) except: pass | this = _animate.new_AnimationPlayer(*args, **kwargs) try: self.this.append(this) except: self.this = this __swig_destroy__ = _animate.delete_AnimationPlayer __del__ = lambda self : None; | def __init__(self, *args, **kwargs): """__init__(self, AnimationBase animation=None, bool destroyAnimation=False) -> AnimationPlayer""" newobj = _animate.new_AnimationPlayer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown |
class AnimationPlayerPtr(AnimationPlayer): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = AnimationPlayer _animate.AnimationPlayer_swigregister(AnimationPlayerPtr) | AnimationPlayer_swigregister = _animate.AnimationPlayer_swigregister AnimationPlayer_swigregister(AnimationPlayer) | def GetBackingStore(*args, **kwargs): """GetBackingStore(self) -> Bitmap""" return _animate.AnimationPlayer_GetBackingStore(*args, **kwargs) |
def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxAnimationBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __del__(self, destroy=_animate.delete_AnimationBase): """__del__(self)""" try: if self.thisown: destro... | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _animate.delete_AnimationBase __del__ = lambda self : None; | def __init__(self): raise RuntimeError, "No constructor defined" |
class AnimationBasePtr(AnimationBase): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = AnimationBase _animate.AnimationBase_swigregister(AnimationBasePtr) | AnimationBase_swigregister = _animate.AnimationBase_swigregister AnimationBase_swigregister(AnimationBase) | def LoadFile(*args, **kwargs): """LoadFile(self, String filename) -> bool""" return _animate.AnimationBase_LoadFile(*args, **kwargs) |
def __repr__(self): return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args, **kwargs): | def __repr__(self): return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
newobj = _animate.new_GIFAnimation(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_animate.delete_GIFAnimation): """__del__(self)""" try: if self.thisown: destroy(self) except: pass | this = _animate.new_GIFAnimation(*args, **kwargs) try: self.this.append(this) except: self.this = this __swig_destroy__ = _animate.delete_GIFAnimation __del__ = lambda self : None; | def __init__(self, *args, **kwargs): """__init__(self) -> GIFAnimation""" newobj = _animate.new_GIFAnimation(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown |
class GIFAnimationPtr(GIFAnimation): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = GIFAnimation _animate.GIFAnimation_swigregister(GIFAnimationPtr) | GIFAnimation_swigregister = _animate.GIFAnimation_swigregister GIFAnimation_swigregister(GIFAnimation) | def LoadFile(*args, **kwargs): """LoadFile(self, String filename) -> bool""" return _animate.GIFAnimation_LoadFile(*args, **kwargs) |
def __repr__(self): return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args, **kwargs): | def __repr__(self): return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) |
newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown | this = _animate.new_GIFAnimationCtrl(*args, **kwargs) try: self.this.append(this) except: self.this = this | def __init__(self, *args, **kwargs): """ __init__(self, Window parent, int id=-1, String filename=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxAN_FIT_ANIMATION|wxNO_BORDER, String name=AnimationControlNameStr) -> GIFAnimationCtrl """ newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs)... |
class GIFAnimationCtrlPtr(GIFAnimationCtrl): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = GIFAnimationCtrl _animate.GIFAnimationCtrl_swigregister(GIFAnimationCtrlPtr) | GIFAnimationCtrl_swigregister = _animate.GIFAnimationCtrl_swigregister GIFAnimationCtrl_swigregister(GIFAnimationCtrl) | def SetFilename(*args, **kwargs): """SetFilename(self, String filename)""" return _animate.GIFAnimationCtrl_SetFilename(*args, **kwargs) |
if flags & DBItemWriter.LIST: | if flags & (DBItemWriter.LIST | DBItemWriter.SET): | def _ref(self, offset, data, kind, withSchema, attribute, view, name, afterLoadHooks): |
lock = env.lock_get(env.lock_id(), self.ROOT_ID._uuid, | lock = env.lock_get(self._lock_id, self.ROOT_ID._uuid, | def commit(self): |
name=Globals.options.scriptFile, | Globals.options.scriptFile, | def run_startup_script(view): script = None fileName = "" # assume no source file if Globals.options.testScripts: try: for aScript in Script.iterItems(view): if aScript.displayName.lower().startswith(_("test")): aScript.execute(fileName=fileName) finally: # run the cleanup script schema.ns('osaf.app', view).CleanupAfte... |
if not isuuid(value): if isinstance(value, RefList): value = value.uuid else: | if isuuid(value): if kind.getAttribute(name).c.cardinality != 'list': | def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names |
for uRef in refs.iterKeys(self, value, version): | for uRef in refsIterator: | def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names |
result += str(value) | if isinstance(value, Lob): value = value.getInputStream().read() result += "<![CDATA[" + str(value) + "]]>" | def exportProcess(self, item, depth=0): |
def Check_CalendarView(testItem, **attrs): item = testItem.item timedCanvas = App_ns.TimedEvents canvasItem = timedCanvas.widget.GetCanvasItems(item).next() for attrName, attrValue in attrs.keys(): if getattr(canvasItem, attrName) == attrValue: self.logger.ReportPass("(On %s Checking)" % attrName) else: self.... | def Check_CalendarView(testItem, **attrs): |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.