rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
picw = self.pic.size().width() | picSize = self.pic.size() picw, pich = picSize.width(), picSize.height() | def resizeEvent(self, event): super(MdiTable, self).resizeEvent(event) #return size = self.contentsRect().size() |
child = MdiTable() | child = MdiTable(self) | def createMdiChild(self): child = MdiTable() self.mdiArea.addSubWindow(child) child.show() child.shownInit() return child |
return i("empty","") | return "offline" | def dz_wifi(): r = wifi_online() if r: if r[0]==0: return i("net_wired","green")+"^fg(white) "+r[1] if r[0]==1: return i("wifi_02","green")+"^fg(white) "+r[1] else: return i("empty","") |
mail_dir="~/mail" | mail_dir=home_dir+"/mail" | def new_mail(): mail_dir="~/mail" def count_instances(rex,mailbox): return int(cmd([["grep",rex,mail_dir+"/"+mailbox],["wc","-l"]]).strip()) mailboxes={} for mailbox in [f for f in os.listdir(mail_dir) if "IN-" in f]: mailboxes[mailbox] = \ count_instances("^From:",mailbox) \ - count_instances("^Status:",mailbox) ret... |
numfiles = len(os.listdir("~/downloaded")) movedfiles = len([f for f in os.listdir("~/downloaded") if re.match(r'.*\.moved$',f)]) | numfiles = len(os.listdir(home_dir+"/downloaded")) movedfiles = len([f for f in os.listdir(home_dir+"/downloaded") if re.match(r'.*\.moved$',f)]) | def dz_downloaded(): numfiles = len(os.listdir("~/downloaded")) movedfiles = len([f for f in os.listdir("~/downloaded") if re.match(r'.*\.moved$',f)]) if numfiles > 0: if numfiles < 10: color = "blue" else: color = "red" return i("diskette",color)+" "+str(numfiles-movedfiles)+"/"+str(numfiles) else: if movedfiles == 0... |
raw = cmd([["iwconfig"],["grep","-io","essid:\".*\""]]).strip() rex = re.compile(r'ESSID:"(.*)"') m = rex.search(raw) if m: return rex.search(raw).groups()[0] else: return "" | nic="eth0" wifi="wlan0" rex = re.compile(r'inet addr:(.*)') raw_nic = cmd([["ifconfig",nic],["grep","-io","inet addr:[0-9\\.]\+"]]).strip() raw_wifi = cmd([["ifconfig",wifi],["grep","-io","inet addr:[0-9\\.]\+"]]).strip() m_nic = rex.search(raw_nic) m_wifi = rex.search(raw_wifi) if m_nic: return (0,m_nic.groups()[0]) i... | def wifi_online(): raw = cmd([["iwconfig"],["grep","-io","essid:\".*\""]]).strip() rex = re.compile(r'ESSID:"(.*)"') m = rex.search(raw) if m: return rex.search(raw).groups()[0] else: return "" |
if r: return i("wifi_02","green")+"^fg(white) "+r else: return i("wifi_02","") | if r: if r[0]==0: return i("net_wired","green")+"^fg(white) "+r[1] if r[0]==1: return i("wifi_02","green")+"^fg(white) "+r[1] else: return i("empty","") | def dz_wifi(): r = wifi_online() if r: return i("wifi_02","green")+"^fg(white) "+r else: return i("wifi_02","") |
if self.isstatic and not self.idfilts[id].hasStaticValueSet(): self.isstatic = False | def __init__(self, datasetType=None, ids=None, **kw): """ @param datasetType the type of dataset to look for. This can either be a single type name or list of names @param ids a dictionary mapping identifier names to IDFilter instances @param * additional named parameters are taken as identifie... | |
root = self.logger | root = self.log | def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo... |
template = len(outputs > 0) and outputs[0] or inputs[0] | template = len(outputs) > 0 and outputs[0] or inputs[0] | def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t... |
root = Log.getDefaultLog() | root = self.logger | def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo... |
if any(self.range) and any(filter(lambda r: r is None, self.range)): | if len(filter(lambda r: r is not None, self.range)) > 0 and \ len(filter(lambda r: r is None, self.range)) > 0: | def __init__(self, name, min=None, lim=None, values=None, isstaticset=True): """ create the filter @param min the minimum identifier value recognized @param lim one more than the maximum identifier value recognized @param values an arbitrary list of identifier values recognized. These may be listed in addition... |
if any(self.range) and any(filter(lambda r: r is None, self.range)): | if len(filter(lambda r: r is not None, self.range)) > 0 and \ len(filter(lambda r: r is None, self.range)) > 0: | def allowedValues(self): """ return a list representing the complete set of values that will be returned by recognize() (except None). This may raise an exception if hasStaticValueSet() returns False. """ if any(self.range) and any(filter(lambda r: r is None, self.range)): raise RuntimeError("identifier set (%s) is no... |
template = len(output > 0) and outputs[0] or inputs[0] | template = len(outputs > 0) and outputs[0] or inputs[0] | def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t... |
self.tagLogger(jobid) | self.tagLogger(jobid.copy()) | def setAssignment(self, clipboard): self.client.tellReady() self.log.log(Log.INFO-2, "Told JobOffice, I'm ready!") jobid, inputs, outputs = self.client.getAssignment() if jobid is None: raise RuntimeError("empty assignment from JobOffice (event timed out?)") self.log.log(Log.INFO-2, "Received assignment") clipboard.put... |
return min([s.size for s in self.snapshots]) | return min(self.snapshots, key=snapshot_size) | def minimum(self): return min([s.size for s in self.snapshots]) |
return max([s.size for s in self.snapshots]) | return max(self.snapshots, key=snapshot_size) | def maximum(self): return max([s.size for s in self.snapshots]) |
return min(self.snapshots, key=snapshot_size) | snapshots = self.snapshots snapshots.sort(key=snapshot_size) return snapshots[0] | def minimum(self): return min(self.snapshots, key=snapshot_size) |
return max(self.snapshots, key=snapshot_size) | snapshots = self.snapshots snapshots.sort(key=snapshot_size) return snapshots[-1] | def maximum(self): return max(self.snapshots, key=snapshot_size) |
cli.add_option('-a', '--archive', dest='archive', default='text', metavar="DIR", | cli.add_option('-a', '--archive', dest='archive', action='store_true', metavar="DIR", | def projects(self): projects = [] for entry in os.listdir(self.path): entry_path = os.path.join(self.path, entry) |
return min([s for s in self.snapshots]) | return min([s.size for s in self.snapshots]) | def minimum(self): return min([s for s in self.snapshots]) |
return max([s for s in self.snapshots]) | return max([s.size for s in self.snapshots]) | def maximum(self): return max([s for s in self.snapshots]) |
self.timestamp = m.group('year') | self.timestamp = int(m.group('timestamp')) | def __init__(self, path): self.path = path self.id = os.path.basename(path) |
msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType | msg = "HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType | def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType |
msg += u"\r\n\r\n%s" % (body) | msg += "\r\n\r\n%s" % (body) | def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType |
if cls.sys.platform == "win32": filename += "_d" | def __prepare(cls): # This method only needs to be called once. if cls.prepared: return cls.prepared = True # First, we must ensure that the library path is # modified to locate all of the dynamic libraries. target = None filename = "libpandaexpress" + cls.dll_suffix if cls.sys.platform == "win32": filename += "_d" fo... | |
handle = os.popen(LocateBinary("ldconfig") + " -NXp") | if (sys.platform.startswith("freebsd")): handle = os.popen(LocateBinary("ldconfig")) else: handle = os.popen(LocateBinary("ldconfig") + " -NXp") | def GetLibCache(): # Returns a list of cached libraries, not prefixed by lib and not suffixed by .so* or .a! global LD_CACHE if (LD_CACHE == None): LD_CACHE = [] print "Generating library cache..." if (LocateBinary("ldconfig") != None): handle = os.popen(LocateBinary("ldconfig") + " -NXp") result = handle.read().strip(... |
PPATH=get_python_lib(1) PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) | PPATH = get_python_lib(1) if os.path.islink(sys.executable): PEXEC = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) else: PEXEC = sys.executable | def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix PPATH=get_python_lib(1) PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) oscmd("mkdir -p "+destdir+prefix+"/bin") oscmd("mkdir -p "+destdir+prefix+"/include") oscmd("mkd... |
if hasattr(objDef, 'animDict'): | if hasattr(objDef, 'animDict') and objDef.animDict != {}: | def addNewObject(self, typeName, uid = None, model = None, parent=None, anim = None, fSelectObject=True, nodePath=None, nameStr=None): """ function to add new obj to the scene """ if parent is None: parent = self.editor.NPParent |
menuItem = self.menuEdit.Append(-1, "&Rndo") | menuItem = self.menuEdit.Append(-1, "&Redo") | def createMenu(self): menuItem = self.menuFile.Insert(0, -1 , "&New") self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, -1 , "&Load") self.Bind(wx.EVT_MENU, self.onLoad, menuItem) |
if (RUNTIME or RTDIST): OPTS=['DIR:direct/src/plugin_standalone', 'RUNTIME', 'TINYXML', 'OPENSSL'] TargetAdd('plugin_standalone_panda3dBase.obj', opts=OPTS, input='panda3dBase.cxx') | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | |
widget.setPosHpr(state.base, state.pos, state.hpr) else: base.direct.widget.setPosHpr(state.base, state.pos, state.hpr) | if self.worldSpaceManip: widget.setPos(state.base, state.pos) widget.setHpr(render, VBase3(0)) else: widget.setPosHpr(state.base, state.pos, state.hpr) else: if self.worldSpaceManip: widget.setPos(state.base, state.pos) widget.setHpr(render, VBase3(0)) else: base.direct.widget.setPosHpr(state.base, state.pos, state.hpr... | def followSelectedNodePathTask(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: for widget in base.direct.manipulationControl.widgetList: widget.setPosHpr(state.base, state.pos, state.hpr) else: base.direct.widget.setPosHpr(state.base, state.pos, state.hpr) re... |
if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': self.fScaling1D = 1 self.scale1D(state) else: self.fScaling3D = 1 self.scale3D(state) else: | if self.useSeparateScaleHandles: | def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal... |
elif self.fFreeManip: | elif self.fFreeManip and not self.useSeparateScaleHandles: | def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal... |
if base.direct.camera.getName() != 'persp': self.prevHit.assign(self.hitPt) | def xlate1D(self, state): # Constrained 1D Translation along widget axis # Compute nearest hit point along axis and try to keep # that point as close to the current mouse position as possible # what point on the axis is the mouse pointing at? self.hitPt.assign(self.objectHandles.getAxisIntersectPt( self.constraint[:1])... | |
print self.constraint | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) | |
self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) | self.hitPtScale.assign(self.objectHandles.getAxisIntersectPt(self.constraint[:1])) self.hitPtScale = self.objectHandles.getMat().xformVec(self.hitPtScale) | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
d0 = (self.prevHitScale - widgetPos).length() d1 = (self.hitPtScale - widgetPos).length() offset = d1 - d0 currScale = base.direct.widget.getScale() | d0 = (self.prevHitScale).length() if d0 == 0: d0 = 0.001 d1 = (self.hitPtScale).length() if d1 == 0: d1 = 0.001 currScale = self.origScale | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
currScale = Vec3(currScale.getX() + offset, currScale.getY(), currScale.getZ()) if currScale.getX() < 0.0: currScale.setX(0.01) | currScale = Vec3(currScale.getX() * d1/d0, currScale.getY(), currScale.getZ()) | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
currScale = Vec3(currScale.getX(), currScale.getY() + offset, currScale.getZ()) if currScale.getY() < 0.0: currScale.setY(0.01) | currScale = Vec3(currScale.getX(), currScale.getY() * d1/d0, currScale.getZ()) | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
currScale = Vec3(currScale.getX(), currScale.getY(), currScale.getZ() + offset) if currScale.getZ() < 0.0: currScale.setZ(0.01) | currScale = Vec3(currScale.getX(), currScale.getY(), currScale.getZ() * d1/d0) | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
self.prevHitScale.assign(self.hitPtScale) | def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) | |
self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) if self.fScaleInit1: self.fScaleInit1 = 0 self.prevHitScale.assign(self.hitPtScale) else: widgetPos = base.direct.widget.getPos() d0 = (self.prevHitScale - widgetPos).length() d1 = (self.hitPtScale - widgetPos).length() offset = d1 - d0 currScale = base... | if self.useSeparateScaleHandles: self.hitPtScale.assign(self.objectHandles.getAxisIntersectPt(self.constraint[:1])) self.hitPtScale = self.objectHandles.getMat().xformVec(self.hitPtScale) if self.fScaleInit1: self.fScaleInit1 = 0 self.prevHitScale.assign(self.hitPtScale) self.origScale = base.direct.widget.getScale() ... | def scale3D(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt()) |
self.enableHandles(['x-post','x-ring','x-disc']) | self.enableHandles(['x-post','x-ring','x-disc', 'x-scale']) | def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z... |
self.enableHandles(['y-post','y-ring','y-disc']) | self.enableHandles(['y-post','y-ring','y-disc', 'y-scale']) | def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z... |
self.enableHandles(['z-post','z-ring','z-disc']) | self.enableHandles(['z-post','z-ring','z-disc', 'z-scale']) | def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z... |
self.enableHandles(['x-post','x-ring','x-disc', 'y-post','y-ring','y-disc', 'z-post','z-ring','z-disc']) | self.enableHandles(['x-post','x-ring','x-disc','x-scale', 'y-post','y-ring','y-disc','y-scale', 'z-post','z-ring','z-disc','z-scale']) | def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z... |
if handle == 'y-post': | elif handle == 'x-scale' and base.direct.manipulationControl.useSeparateScaleHandles: self.xScaleGroup.reparentTo(self.xHandles) elif handle == 'y-post': | def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) if handle == 'y-post': self.yPostGroup.reparentTo(self.yHandles) elif handle == 'y-ring':... |
if handle == 'z-post': | elif handle == 'y-scale' and base.direct.manipulationControl.useSeparateScaleHandles: self.yScaleGroup.reparentTo(self.yHandles) elif handle == 'z-post': | def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) if handle == 'y-post': self.yPostGroup.reparentTo(self.yHandles) elif handle == 'y-ring':... |
self.disableHandles(['x-post','x-ring','x-disc']) | self.disableHandles(['x-post','x-ring','x-disc','x-scale']) | def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin... |
self.disableHandles(['y-post','y-ring','y-disc']) | self.disableHandles(['y-post','y-ring','y-disc','y-scale']) | def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin... |
self.disableHandles(['z-post','z-ring','z-disc']) | self.disableHandles(['z-post','z-ring','z-disc','z-scale']) | def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin... |
self.disableHandles(['x-post','x-ring','x-disc', 'y-post','y-ring','y-disc', 'z-post','z-ring','z-disc']) | self.disableHandles(['x-post','x-ring','x-disc','x-scale', 'y-post','y-ring','y-disc','y-scale', 'z-post','z-ring','z-disc','z-scale']) | def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin... |
hitPt = entry.getSurfacePoint(entry.getFromNodePath()) np = NodePath('temp') np.setPos(base.direct.camera, hitPt) self.hitPt.assign(np.getPos()) np.remove() | self.hitPt = entry.getSurfacePoint(self) | def getAxisIntersectPt(self, axis): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView and\ base.direct.camera.getName() != 'persp': # create ray from the camera to detect 3d position iRay = SelectionRay(base.direct.camera) iRay.collider.setFromLens(base.direct.camNode, base.d... |
def drawBox(lines, center, sideLength): l = sideLength * 0.5 lines.moveTo(center[0] + l, center[1] + l, center[2] + l) lines.drawTo(center[0] + l, center[1] + l, center[2] - l) lines.drawTo(center[0] + l, center[1] - l, center[2] - l) lines.drawTo(center[0] + l, center[1] - l, center[2] + l) lines.drawTo(center[0] + l... | def getWidgetIntersectPt(self, nodePath, plane): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView and\ base.direct.camera.getName() != 'persp': self.hitPt.assign(self.getMouseIntersectPt()) return self.hitPt # Find out the point of interection of the ray passing though the ... | |
PkgDisable("contrib") | PkgDisable("CONTRIB") | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=... |
import pdb;pdb.set_trace() | def setTitleWithFilename(self, filename=""): import pdb;pdb.set_trace() title = self.ui.appname if filename != "": filenameshort = os.path.basename(filename) title = title + " (%s)"%filenameshort self.ui.SetLabel(title) | |
TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA']) | TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL', 'X11', 'XRANDR', 'XF86DGA']) | TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandagles2.dll', opts=['MODULE', 'GLES2', 'EGL', 'X11', 'XRANDR', 'XF86DGA']) | TargetAdd('libpandagles2.dll', opts=['MODULE', 'GLES2', 'EGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libtinydisplay.dll', opts=['X11', 'XRANDR', 'XF86DGA']) | TargetAdd('libtinydisplay.dll', opts=['X11', 'XRANDR', 'XF86DGA', 'XCURSOR']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
for vfile in vfs.scanDirectory(self.pathname): | files = vfs.scanDirectory(self.pathname) if files is None: files = [] for vfile in files: | def __init__(self, pathname, ignoreUsageXml = False): self.pathname = pathname self.filenames = [] self.fileSize = 0 self.nested = [] self.nestedSize = 0 |
LibName("OPENGL", "opengl32.lib") LibName("OPENGL", "glu32.lib") | LibName("GL", "opengl32.lib") LibName("GL", "glu32.lib") LibName("GLES", "libgles_cm.lib") LibName("GLES2", "libGLESv2.lib") LibName("EGL", "libEGL.lib") | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th... |
IncDirectory("OPENGL", "/usr/X11R6/include") | IncDirectory("GL", "/usr/X11R6/include") | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th... |
SmartPkgEnable("OPENGL", "gl", ("GL"), ("GL/gl.h", "GL/glu.h"), framework = "OpenGL") | SmartPkgEnable("GL", "gl", ("GL"), ("GL/gl.h", "GL/glu.h"), framework = "OpenGL") SmartPkgEnable("GLES", "glesv1_cm", ("GLESv1_CM"), ("GLES/gl.h"), framework = "OpenGLES") SmartPkgEnable("GLES2", "glesv2", ("GLESv2"), ("GLES2/gl2.h")) SmartPkgEnable("EGL", "egl", ("EGL"), ("EGL/egl... | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th... |
LibName("OPENGL", "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib") | LibName("GL", "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib") | def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th... |
("HAVE_GL", '1', '1'), | ("HAVE_GL", '1', 'UNDEF'), ("HAVE_GLES", 'UNDEF', 'UNDEF'), ("HAVE_GLES2", 'UNDEF', 'UNDEF'), | ProgressOutput(progress, "Building package from pdef file", infile) |
TargetAdd('libp3glstuff.dll', opts=['ADVAPI', 'OPENGL', 'NVIDIACG', 'CGGL']) | TargetAdd('libp3glstuff.dll', opts=['ADVAPI', 'GL', 'NVIDIACG', 'CGGL']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (not RUNTIME and PkgSkip("OPENGL")==0): OPTS=['DIR:panda/src/glgsg', 'DIR:panda/src/glstuff', 'DIR:panda/src/gobj', 'BUILDING:PANDAGL', 'NVIDIACG'] | if (not RUNTIME and PkgSkip("GL")==0): OPTS=['DIR:panda/src/glgsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL', 'NVIDIACG'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (not sys.platform.startswith("win") and PkgSkip("OPENGL")==0 and PkgSkip("OSMESA")==0 and not RUNTIME): OPTS=['DIR:panda/src/mesadisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLUT', 'NVIDIACG', 'OPENGL', 'OSMESA'] | if (not sys.platform.startswith("win") and PkgSkip("GL")==0 and PkgSkip("OSMESA")==0 and not RUNTIME): OPTS=['DIR:panda/src/mesadisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLUT', 'NVIDIACG', 'GL', 'OSMESA'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGLUT', 'NVIDIACG', 'OPENGL'] | OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGLUT', 'NVIDIACG', 'GL'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandamesa.dll', opts=['MODULE', 'OPENGL', 'OSMESA']) | TargetAdd('libpandamesa.dll', opts=['MODULE', 'GL', 'OSMESA']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (sys.platform != "win32" and sys.platform != "darwin" and PkgSkip("OPENGL")==0 and PkgSkip("X11")==0 and not RUNTIME): OPTS=['DIR:panda/src/glxdisplay', 'BUILDING:PANDAGLUT', 'OPENGL', 'NVIDIACG', 'CGGL'] | if (sys.platform != "win32" and sys.platform != "darwin" and PkgSkip("GL")==0 and PkgSkip("X11")==0 and not RUNTIME): OPTS=['DIR:panda/src/glxdisplay', 'BUILDING:PANDAGLUT', 'GL', 'NVIDIACG', 'CGGL'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGLUT', 'OPENGL', 'NVIDIACG', 'CGGL'] | OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGLUT', 'GL', 'NVIDIACG', 'CGGL'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandagl.dll', opts=['MODULE', 'OPENGL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA']) | TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (sys.platform == 'darwin' and PkgSkip("OPENGL")==0 and not RUNTIME): OPTS=['DIR:panda/src/osxdisplay', 'BUILDING:PANDAGLUT', 'OPENGL', 'NVIDIACG', 'CGGL'] | if (sys.platform == 'darwin' and PkgSkip("GL")==0 and not RUNTIME): OPTS=['DIR:panda/src/osxdisplay', 'BUILDING:PANDAGLUT', 'GL', 'NVIDIACG', 'CGGL'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandagl.dll', opts=['MODULE', 'OPENGL', 'NVIDIACG', 'CGGL', 'CARBON', 'AGL', 'COCOA']) | TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'CARBON', 'AGL', 'COCOA']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (sys.platform == "win32" and PkgSkip("OPENGL")==0 and not RUNTIME): | if (sys.platform == "win32" and PkgSkip("GL")==0 and not RUNTIME): | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandagl.dll', opts=['MODULE', 'WINGDI', 'OPENGL', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NVIDIACG', 'CGGL']) | TargetAdd('libpandagl.dll', opts=['MODULE', 'WINGDI', 'GL', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NVIDIACG', 'CGGL']) if (PkgSkip("EGL")==0 and PkgSkip("GLES")==0 and PkgSkip("X11")==0 and not RUNTIME): DefSymbol('GLES', 'OPENGLES_1', '') OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUIL... | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
TargetAdd('libpandaspeedtree.dll', opts=['OPENGL', 'NVIDIACG', 'CGGL']) | TargetAdd('libpandaspeedtree.dll', opts=['GL', 'NVIDIACG', 'CGGL']) | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
if (not os.path.islink(libname)): | if (libname.endswith(".dylib") and not os.path.islink(libname)): | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... |
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) | if not libdep.startswith("/Developer/Panda3D/lib/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... |
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) | if not libdep.startswith("/Developer/Panda3D/lib/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... |
oscmd("rpmbuild --define '_rpmdir "+pandasource+"' --root "+pandasource+" --buildroot targetroot -bb panda3d.spec") | oscmd("rpmbuild --define '_rpmdir "+pandasource+"' --buildroot '"+os.abspath("targetroot")+"' -bb panda3d.spec") | def MakeInstallerLinux(): if RUNTIME: # No worries, it won't be used PYTHONV = "python" else: PYTHONV = SDK["PYTHONVERSION"] PV = PYTHONV.replace("python", "") if (os.path.isdir("targetroot")): oscmd("chmod -R 755 targetroot") oscmd("rm -rf targetroot data.tar.gz control.tar.gz panda3d.spec") oscmd("mkdir targetroot") ... |
if module not in self.freezer.modules.keys() or \ self.freezer.modules[module].exclude: | if module not in moduleDict: | for moduleName, mdef in self.skipModules.items(): if moduleName not in self.freezer.modules: self.freezer.excludeModule( moduleName, allowChildren = mdef.allowChildren, forbid = mdef.forbid, fromSource = 'skip') |
cmd += " -arch x86_64 -arch i386" | cmd += " -arch i386" | def CompileCxx(obj,src,opts): ipath = GetListOption(opts, "DIR:") if (COMPILER=="MSVC"): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 /Fo" + obj + " /nologo /c" for x in ipath: cmd += " /I" + x for (opt,dir) in INCDIRECTORIES: if (opt=="ALW... |
if (COMPILER=="LINUX") and (platform.architecture()[0]=="64bit"): | if (COMPILER=="LINUX") and (platform.architecture()[0]=="64bit") and (sys.platform!="darwin"): | def CompileIgate(woutd,wsrc,opts): outbase = os.path.basename(woutd)[:-3] woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" wobj = FindLocation(outbase + "_igate.obj", []) srcdir = GetValueOption(opts, "SRCDIR:") module = GetValueOption(opts, "IMOD:") library = GetValueOption(opts, "ILIB:") ipath = GetListOption(opts... |
cmd += " -arch x86_64 -arch i386" | cmd += " -arch i386" | def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = "link /nologo" if (platform.architecture()[0] == "64bit"): cmd += " /MACHINE:X64" if ("MFC" not in opts): cmd += " /NOD:MFC90.LIB /NOD:MFC80.LIB /NOD:LIBCMT" cmd += " /NOD:LIBCI.LIB /DEBUG" cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls" if (GetOrig... |
self.host = HostInfo(PandaSystem.getPackageHostUrl(), hostDir = hostDir, asMirror = False, perPlatform = True) | self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = base.appRunner, hostDir = hostDir, asMirror = False, perPlatform = True) | def __init__(self, p3dfile, tokens = {}): self.p3dfile = Filename(p3dfile) self.basename = self.p3dfile.getBasenameWoExtension() self.tokens = tokens hostDir = Filename(Filename.getTempDirectory(), 'pdeploy/') hostDir.makeDir() self.host = HostInfo(PandaSystem.getPackageHostUrl(), hostDir = hostDir, asMirror = False, ... |
host = HostInfo(self.hostUrl, rootDir = rootDir, asMirror = True, perPlatform = False) | host = HostInfo(self.hostUrl, appRunner = base.appRunner, rootDir = rootDir, asMirror = True, perPlatform = False) | def installPackagesInto(self, rootDir, platform): """ Installs the packages required by the .p3d file into the specified root directory, for the given platform. """ if not self.includeRequires: return host = HostInfo(self.hostUrl, rootDir = rootDir, asMirror = True, perPlatform = False) if not host.readContentsFile()... |
host = HostInfo(self.standalone.host.hostUrl, rootDir = rootDir, asMirror = False, perPlatform = False) | host = HostInfo(self.standalone.host.hostUrl, appRunner = base.appRunner, rootDir = rootDir, asMirror = False, perPlatform = False) | def installPackagesInto(self, rootDir, platform): """ Installs the packages required by the .p3d file into the specified root directory, for the given platform. """ if not self.includeRequires: return host = HostInfo(self.hostUrl, rootDir = rootDir, asMirror = True, perPlatform = False) if not host.readContentsFile()... |
if (True or (not RUNTIME and not RTDIST)): | if (not RUNTIME and not RTDIST): | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" |
Release: 1 | Release: RPMRELEASE | def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHON... |
if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) | if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True) | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... |
if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) | if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), binname), True) | def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm... |
buffer.addRenderTexture(depthtex, GraphicsOutput.RTMBindOrCopy, GraphicsOutput.RTPDepthStencil) | buffer.addRenderTexture(depthtex, GraphicsOutput.RTMBindOrCopy, GraphicsOutput.RTPDepth) | def createBuffer(self, name, xsize, ysize, texgroup, depthbits=1): """ Low-level buffer creation. Not intended for public use. """ |
def __init__(self, name=None, grp=None, cfg=None, frameCount=1): | def __init__(self, name=None, grp=None, cfg=None, iff=True): | def __init__(self, name=None, grp=None, cfg=None, frameCount=1): #check early out conditions if not bpEnabled: return |
if not iff: | if not self.iff or not iff: | def shouldBreak(self,iff=True): #check easy early out if not iff: return False |
def __init__(self,name,grp=None,cfg=None,frameCount=1): | def __init__(self,name,grp=None,cfg=None,iff=True): | def __init__(self,name,grp=None,cfg=None,frameCount=1): pass |
if dbp.shouldBreak(iff=iff): dbp.doBreak(frameCount=frameCount+1) | dbp.maybeBreak(iff=iff,frameCount=frameCount+1) | def wrap(*args, **kwds): #create our bp object dname = name or f.__name__ dgrp = grp dcfg = cfg dbp = bp(name=dname,grp=dgrp,cfg=dcfg) if dbp.shouldBreak(iff=iff): dbp.doBreak(frameCount=frameCount+1) f_result = f(*args, **kwds) return f_result |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.