rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
target = self.getDefault() record.__getattribute__(self.attr).append(target)
if type in ('EPFD','EPFT','EPF2','EPF3','SCHR'): target = self.getDefault() record.__getattribute__(self.attr).append(target) else: target = record.__getattribute__(self.attr)[-1]
def loadData(self,record,ins,type,size,readId): target = self.getDefault() record.__getattribute__(self.attr).append(target) element = self.loaders[type] slots = ['recordType'] slots.extend(element.getSlotsUsed()) target.__slots__ = slots target.recordType = type element.loadData(target,ins,type,size,readId)
8a33ba5ad5c871988acb06c3aff741da65ad6b4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/8a33ba5ad5c871988acb06c3aff741da65ad6b4a/bosh.py
target = record.__getattribute__(self.attr) if not target: return element = self.loaders[target.recordType] if not element: raise ModError(ins.inName,_('Unexpected type: %d') % target.recordType) element.dumpData(target,out)
for target in record.__getattribute__(self.attr): element = self.loaders[target.recordType] if not element: raise ModError(ins.inName,_('Unexpected type: %d') % target.recordType) element.dumpData(target,out)
def dumpData(self,record,out): target = record.__getattribute__(self.attr) if not target: return element = self.loaders[target.recordType] if not element: raise ModError(ins.inName,_('Unexpected type: %d') % target.recordType) element.dumpData(target,out)
8a33ba5ad5c871988acb06c3aff741da65ad6b4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/8a33ba5ad5c871988acb06c3aff741da65ad6b4a/bosh.py
for recClass in (MreWeap,MreActi,MreAlch,MreAppa,MreArmo,MreBook,MreClot,MreCont,MreCrea,MreDoor,MreFlor,MreFurn,MreIngr,MreKeym,MreLigh,MreMisc,MreNpc,MreQust,MreSgst,MreSlgm,):
for recClass in (MreWeap,MreActi,MreAlch,MreArmo,MreBook,MreCont,MreCrea,MreDoor,MreFlor,MreFurn,MreIngr,MreKeym,MreLigh,MreMisc,MreNpc,MreQust,MreTerm):
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
4eaa4e98570108979df999e215e656262882d512 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4eaa4e98570108979df999e215e656262882d512/bosh.py
self.longTypes = set(('WEAP','ACTI','ALCH','APPA','ARMO','BOOK','CLOT','CONT','CREA','DOOR','FLOR','FURN','INGR','KEYM','LIGH','MISC','NPC_','QUST','SGST','SLGM'))
self.longTypes = set(('WEAP','ACTI','ALCH','ARMO','BOOK','CONT','CREA','DOOR','FLOR','FURN','INGR','KEYM','LIGH','MISC','NPC_','QUST','TERM'))
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
4eaa4e98570108979df999e215e656262882d512 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4eaa4e98570108979df999e215e656262882d512/bosh.py
out.seek(-20,1)
out.seek(-recHeaderSize,1)
def copyPrev(size): ins.seek(-size,1) buff = ins.read(size) out.write(buff)
fa4c366ff44dbdd8f44181353e444f75a7b1a07a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/fa4c366ff44dbdd8f44181353e444f75a7b1a07a/bosh.py
MelStructA('WLST','Ii', 'Weather', (FID,'weather'), 'chance'),
MelStruct('WLST','IiI', 'Weather', (FID,'weather'), 'chance', (FID,'global')),
# def loadData(self,record,ins,type,size,readId):
f9df88e12839bac113a4170447c2846083f37502 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f9df88e12839bac113a4170447c2846083f37502/bosh.py
(self.folderCount,self.fileCount,lenFolderNames,lenFileNames,fileFlags,fileFlags2) = ins.unpack('6I',recHeaderSize)
(self.folderCount,self.fileCount,lenFolderNames,lenFileNames,fileFlags) = ins.unpack('5I',20)
def scan(self): """Reports on contents.""" ins = bolt.StructFile(self.path.s,'rb') #--Header ins.seek(4*4) (self.folderCount,self.fileCount,lenFolderNames,lenFileNames,fileFlags,fileFlags2) = ins.unpack('6I',recHeaderSize) #--FolderInfos (Initial) folderInfos = self.folderInfos = [] for index in range(self.folderCount)...
00d94c53d498ae4b7ef69d1041a3b5916d3fca63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/00d94c53d498ae4b7ef69d1041a3b5916d3fca63/bosh.py
('Fallout - Sounds.bsa',1138162634),
('Fallout - Sound.bsa',1138162634),
def resetMTimes(self): """Reset dates of bsa files to 'correct' values.""" #--Fix the data of a few archive files bsaTimes = ( ('Fallout - MenuVoices.bsa',1138575220), ('Fallout - Meshes.bsa',1139433736), ('Fallout - Misc.bsa',1138660560), ('Fallout - Sounds.bsa',1138162634), ('Fallout - Textures.bsa',1138162934), ('Fa...
00d94c53d498ae4b7ef69d1041a3b5916d3fca63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/00d94c53d498ae4b7ef69d1041a3b5916d3fca63/bosh.py
if size == 102:
if size == 186:
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that...
bb8dded3d0038a77d8e132eb182951a44f590672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/bb8dded3d0038a77d8e132eb182951a44f590672/bosh.py
elif size == 86: unpacked = ins.unpack('11f3Bs3Bs3BsB3s6f2s',size,readId) elif size == 62: unpacked = ins.unpack('11f3Bs3Bs3BsB3s2s',size,readId) elif size == 42: unpacked = ins.unpack('10f2s',size,readId)
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that...
bb8dded3d0038a77d8e132eb182951a44f590672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/bb8dded3d0038a77d8e132eb182951a44f590672/bosh.py
unpacked = ins.unpack('2s',size,readId)
record.damage = ins.unpack('H',size,readId) return else: raise "Unexpected size encountered for WATR subrecord: %s" % size def dumpData(self,record,out): out.packSub(self.subType,'H',record.damage) class MelWatrDnam(MelStruct): """Handle older trucated DNAM for WATR subrecord.""" def loadData(self,record,ins,type,size...
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that...
bb8dded3d0038a77d8e132eb182951a44f590672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/bb8dded3d0038a77d8e132eb182951a44f590672/bosh.py
MelString('TNAM','texture'),
MelString('FULL','full'), MelString('NNAM','texture'),
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that...
bb8dded3d0038a77d8e132eb182951a44f590672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/bb8dded3d0038a77d8e132eb182951a44f590672/bosh.py
MelWatrData('DATA', '11f3Bs3Bs3BsB3s10fH',('windVelocity',0.100), ('windDirection',90.0),('waveAmp',0.5),('waveFreq',1.0),('sunPower',50.0), ('reflectAmt',0.5),('fresnelAmt',0.0250),('xSpeed',0.0),('ySpeed',0.0), ('fogNear',27852.8),('fogFar',163840.0),('shallowRed',0),('shallowGreen',128), ('shallowBlue',128),('unused...
MelFid('XNAM','effect'), MelWatrData('DATA','10f3Bs3Bs3BsI32fH',('windVelocity',0.100),('windDirection',90.0), ('waveAmp',0.5),('waveFreq',1.0),('sunPower',50.0),('reflectAmt',0.5), ('fresnelAmt',0.0250),('unknown1',0.0),('fogNear',27852.8),('fogFar',163840.0), ('shallowRed',0),('shallowGreen',128),('shallowBlue',128),...
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that...
bb8dded3d0038a77d8e132eb182951a44f590672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/bb8dded3d0038a77d8e132eb182951a44f590672/bosh.py
(_('F Radroach Meat'), '%s '), (_('F. Radroach Meat'), '%s. '), (_('F - Radroach Meat'),'%s - '), (_('(F) Radroach Meat'),'(%s) '),
(_('F Radroach Meat'), '\x07\x07\x07\x07\x07%s '), (_('F. Radroach Meat'), '\x07\x07\x07\x07\x07%s. '), (_('F - Radroach Meat'),'\x07\x07\x07\x07\x07%s - '), (_('(F) Radroach Meat'),'\x07\x07\x07\x07\x07(%s) '),
def __init__(self): MultiTweakItem.__init__(self,_("Ingestibles"), _('Label ingestibles to sort by type. C: Chems, F: Food, S: Stimpack, A: Alcohol.'), 'ALCH', (_('F Radroach Meat'), '%s '), (_('F. Radroach Meat'), '%s. '), (_('F - Radroach Meat'),'%s - '), (_('(F) Radroach Meat'),'(%s) '), )
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
(_('S BB Gun'), '%s '), (_('S. BB Gun'), '%s. '), (_('S - BB Gun'),'%s - '), (_('(S) BB Gun'),'(%s) '),
(_('S BB Gun'), '\x07\x07%s '), (_('S. BB Gun'), '\x07\x07%s. '), (_('S - BB Gun'),'\x07\x07%s - '), (_('(S) BB Gun'),'\x07\x07(%s) '),
def __init__(self): MultiTweakItem.__init__(self,_("Weapons"), _('Label ammo and weapons to sort by type and damage.'), 'WEAP', (_('S BB Gun'), '%s '), (_('S. BB Gun'), '%s. '), (_('S - BB Gun'),'%s - '), (_('(S) BB Gun'),'(%s) '), ('----','----'), (_('S10 BB Gun'), '%s%02d '), (_('S10. BB Gun'), '%s%02d. '), (_('S10...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
(_('S10 BB Gun'), '%s%02d '), (_('S10. BB Gun'), '%s%02d. '), (_('S10 - BB Gun'),'%s%02d - '), (_('(S10) BB Gun'),'(%s%02d) '),
(_('S10 BB Gun'), '\x07\x07%s%02d '), (_('S10. BB Gun'), '\x07\x07%s%02d. '), (_('S10 - BB Gun'),'\x07\x07%s%02d - '), (_('(S10) BB Gun'),'\x07\x07(%s%02d) '),
def __init__(self): MultiTweakItem.__init__(self,_("Weapons"), _('Label ammo and weapons to sort by type and damage.'), 'WEAP', (_('S BB Gun'), '%s '), (_('S. BB Gun'), '%s. '), (_('S - BB Gun'),'%s - '), (_('(S) BB Gun'),'(%s) '), ('----','----'), (_('S10 BB Gun'), '%s%02d '), (_('S10. BB Gun'), '%s%02d. '), (_('S10...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
for blockType in ('WEAP',):
for blockType in ('AMMO','WEAP'):
def scanModFile(self,modFile,progress,patchFile): """Scans specified mod file to extract info. May add record to patch mod, but won't alter it.""" mapper = modFile.getLongMapper() #for blockType in ('AMMO','WEAP'): for blockType in ('WEAP',): modBlock = getattr(modFile,blockType) patchBlock = getattr(patchFile,blockTyp...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
ammoFormat = '\x07' for record in patchFile.AMMO.records: if not record.full: continue record.full = ammoFormat + record.full keep(record.fid) srcMod = record.fid[0] count[srcMod] = count.get(srcMod,0) + 1
def buildPatch(self,log,progress,patchFile): """Edits patch file as desired. Will write to log.""" count = {} format = self.choiceValues[self.chosen][0] showStat = '%02d' in format keep = patchFile.getKeeper() codes = getattr(patchFile,'weaponTags','BESMUTL') #ammoFormat = format.replace('%02d','',1) # for record in pa...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
(_('A Naughty Nightwear'), '%s '), (_('A. Naughty Nightwear'), '%s. '), (_('A - Naughty Nightwear'),'%s - '), (_('(A) Naughty Nightwear'),'(%s) '),
(_('A Naughty Nightwear'), '\x07\x07\x07%s '), (_('A. Naughty Nightwear'), '\x07\x07\x07%s. '), (_('A - Naughty Nightwear'),'\x07\x07\x07%s - '), (_('(A) Naughty Nightwear'),'\x07\x07\x07(%s) '),
def buildPatch(self,log,progress,patchFile): """Edits patch file as desired. Will write to log.""" count = {} format = self.choiceValues[self.chosen][0] showStat = '%02d' in format keep = patchFile.getKeeper() codes = getattr(patchFile,'weaponTags','BESMUTL') #ammoFormat = format.replace('%02d','',1) # for record in pa...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
(_('A01 Naughty Nightwear'), '%s%02d '), (_('A01. Naughty Nightwear'), '%s%02d. '), (_('A01 - Naughty Nightwear'),'%s%02d - '), (_('(A01) Naughty Nightwear'),'(%s%02d) '),
(_('A01 Naughty Nightwear'), '\x07\x07\x07%s%02d '), (_('A01. Naughty Nightwear'), '\x07\x07\x07%s%02d. '), (_('A01 - Naughty Nightwear'),'\x07\x07\x07%s%02d - '), (_('(A01) Naughty Nightwear'),'\x07\x07\x07(%s%02d) '),
def buildPatch(self,log,progress,patchFile): """Edits patch file as desired. Will write to log.""" count = {} format = self.choiceValues[self.chosen][0] showStat = '%02d' in format keep = patchFile.getKeeper() codes = getattr(patchFile,'weaponTags','BESMUTL') #ammoFormat = format.replace('%02d','',1) # for record in pa...
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
for recClass in (MreCont,MreDoor,):
for recClass in (MreCont,MreDoor,MreTerm):
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
eb7e3691f93e9d43034012aa4a215fcf525e2374 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/eb7e3691f93e9d43034012aa4a215fcf525e2374/bosh.py
'DEBR','EXPL','MGEF','SCPT','SPEL','SOUN','NPC_','WATR','TXST','ENCH','FLST','IPDS','STAT',''))
'DEBR','EXPL','MGEF','SCPT','SPEL','SOUN','NPC_','WATR','TXST','ENCH','FLST','IPDS','STAT','NOTE','QUST'))
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
eb7e3691f93e9d43034012aa4a215fcf525e2374 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/eb7e3691f93e9d43034012aa4a215fcf525e2374/bosh.py
patchFile.safeSave()
while True: try: patchFile.safeSave() except WindowsError: message = _("The patch cannot be written to (Data\\%s).\nIt might be locking by other processes.\nDo you want to retry or cancel?") % (patchName.s,) if balt.askWarning(self,fill(message,80),_("Couldn't write ")+patchName.s): continue raise break
def Execute(self,event=None): """Do the patch.""" self.EndModal(wx.ID_OK) patchName = self.patchInfo.name progress = balt.Progress(patchName.s,(' '*60+'\n')) try: #--Save configs patchConfigs = {'ImportedMods':set()} for patcher in self.patchers: patcher.saveConfig(patchConfigs) bosh.modInfos.table.setItem(patchName,'b...
c3b4c259766144b354e0b0ed5b582bfff373050d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/c3b4c259766144b354e0b0ed5b582bfff373050d/basher.py
class MelSounSndd(MelStruct): """SNDD is an older version of SNDX. Allow it to read in, but not set defaults or write."""
class MelSounSndx(MelStruct): """SNDX is a reduced version of SNDD. Allow it to read in, but not set defaults or write."""
def dumpData(self,record,out): """Conditionally dumps data.""" if record.entryType == 7 and self.subType == 'RDMD': MelOptStruct.dumpData(self,record,out)
42bac2d1bab8d28501bf07ca8a68703266c8bbd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/42bac2d1bab8d28501bf07ca8a68703266c8bbd9/bosh.py
record.staticAtten = 0 record.stopTime = 0 record.startTime = 0
record.point0 = 0 record.point1 = 0 record.point2 = 0 record.point3 = 0 record.point4 = 0 record.reverb = 0 record.priority = 0 record.unknown = "\0"*8
def loadData(self,record,ins,type,size,readId): MelStruct.loadData(self,record,ins,type,size,readId) record.staticAtten = 0 record.stopTime = 0 record.startTime = 0
42bac2d1bab8d28501bf07ca8a68703266c8bbd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/42bac2d1bab8d28501bf07ca8a68703266c8bbd9/bosh.py
MelSounSndd('SNDD','=2BbsH2s','minDistance', 'maxDistance', 'freqAdjustment', ('unused1',null1), (_flags,'flags'), ('unused2',null2)), MelOptStruct('SNDX','=2BbsH2sh2B',('minDistance',None), ('maxDistance',None), ('freqAdjustment',None), ('unused1',null1), (_flags,'flags',None), ('unused2',null2), ('staticAtten',None),...
MelOptStruct('SNDD','=2BbsIh2B6HI8s',('minDistance',None), ('maxDistance',None), ('freqAdjustment',None), ('unused1',null1), (_flags,'flags',None),('staticAtten',None),('stopTime',None),('startTime',None), ('point0',0),('point1',0),('point2',0),('point3',0),('point4',0),('reverb',0),('priority',0),'unk...
def dumpData(self,record,out): return
42bac2d1bab8d28501bf07ca8a68703266c8bbd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/42bac2d1bab8d28501bf07ca8a68703266c8bbd9/bosh.py
MelFid('SNAM','sound'),
MelGroup('destructable', MelBase('DEST','header'), MelStruct('DEST','IhH','health','count','flags'), MelGroups('stages', MelStruct('DSTD','=4B4I','health','index','damageStage','flags', 'selfDamagePerSecond',(FID,'explosion',None),(FID,'debris',None),'debrisCount'), MelString('DMDL','model'), MelBa...
def getEffectsSummary(self,mgef_school=None,mgef_name=None): """Return a text description of magic effects.""" mgef_school = mgef_school or bush.mgef_school mgef_name = mgef_name or bush.mgef_name buff = cStringIO.StringIO() avEffects = bush.actorValueEffects aValues = bush.actorValues buffWrite = buff.write if self.ef...
6bd5a53acf99e85e527eb9e4ebec85b20c6dd97c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/6bd5a53acf99e85e527eb9e4ebec85b20c6dd97c/bosh.py
MelStructs('DSTD','=4B4I','stages','health','index','damageStage', 'flags','selfDamagePerSecond',(FID,'explosion',None), (FID,'debris',None),'debrisCount'), MelBase('DSTF','footer'),
MelStruct('DEST','IhH','health','count','flags'), MelGroups('stages', MelStruct('DSTD','=4B4I','health','index','damageStage','flags', 'selfDamagePerSecond',(FID,'explosion',None),(FID,'debris',None),'debrisCount'), MelString('DMDL','model'), MelBase('DMDT','_dmdt'), MelBase('DSTF','footer'), ),
def loadData(self,record,ins,type,size,readId): if size == 136: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 124: #--Else 124 byte record (skips sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIffI',size,readId) elif size == 120...
6bd5a53acf99e85e527eb9e4ebec85b20c6dd97c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/6bd5a53acf99e85e527eb9e4ebec85b20c6dd97c/bosh.py
(4,'ingredients'),
(4,'foods'), (5,'chems'), (6,'stimpacks'),
def dumpData(self,record,out): if not record.flags.isInterior: MelOptStruct.dumpData(self,record,out)
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
(8,'apparatus'),
def dumpData(self,record,out): if not record.flags.isInterior: MelOptStruct.dumpData(self,record,out)
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
(11,'spells'), (12,'magicItems'),
def dumpData(self,record,out): if not record.flags.isInterior: MelOptStruct.dumpData(self,record,out)
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
def loadData(self,record,ins,type,size,readId): if size == 52: MelStruct.loadData(self,record,ins,type,size,readId) return unpacked = ins.unpack('2iI7i2I',size,readId) unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,action in zip(self.attrs,unpacked,self.actions): if callable(actio...
def loadData(self,record,ins,type,size,readId): if size == 52: MelStruct.loadData(self,record,ins,type,size,readId) return #--Else 42 byte record (skips trainSkill, trainLevel,unused1... unpacked = ins.unpack('2iI7i2I',size,readId) unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,act...
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
MelClasData('DATA','2iI7i2IbB2s','primary1','primary2','specialization','major1','major2','major3','major4','major5','major6','major7',(_flags,'flags',0L),(aiService,'services',0L),('trainSkill',0),('trainLevel',0),('unused1',null2)),
MelClasData('DATA','4I2IbB2s','tagSkill1','tagSkill2','tagSkill3','tagSkill4',(_flags,'flags',0L),(aiService,'services',0L),('trainSkill',0),('trainLevel',0),('unused1',null2)),
def loadData(self,record,ins,type,size,readId): if size == 52: MelStruct.loadData(self,record,ins,type,size,readId) return #--Else 42 byte record (skips trainSkill, trainLevel,unused1... unpacked = ins.unpack('2iI7i2I',size,readId) unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,act...
f929c28026e3bd16332e1f69032af91c7c383beb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/f929c28026e3bd16332e1f69032af91c7c383beb/bosh.py
out.write(rowFormat % (type,longid[0].s,longid[1],eid,name,sname))
out.write(rowFormat % (type,longid[0].s,longid[1],eid,name.replace('"', '""'),sname.replace('"', '""')))
def writeToText(self,textPath): """Exports type_id_name to specified text file.""" textPath = GPath(textPath) type_id_name = self.type_id_name type_id_sname = self.type_id_sname out = textPath.open('w') for type in sorted(type_id_name): if type in self.hasShortNameTypes: headFormat = '"%s","%s","%s","%s","%s","%s"\n' r...
3207fa7cdf0957166c60eb1dc1f646b588a3a814 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3207fa7cdf0957166c60eb1dc1f646b588a3a814/bosh.py
out.write(rowFormat % (type,longid[0].s,longid[1],eid,name))
out.write(rowFormat % (type,longid[0].s,longid[1],eid,name.replace('"', '""')))
def writeToText(self,textPath): """Exports type_id_name to specified text file.""" textPath = GPath(textPath) type_id_name = self.type_id_name type_id_sname = self.type_id_sname out = textPath.open('w') for type in sorted(type_id_name): if type in self.hasShortNameTypes: headFormat = '"%s","%s","%s","%s","%s","%s"\n' r...
3207fa7cdf0957166c60eb1dc1f646b588a3a814 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3207fa7cdf0957166c60eb1dc1f646b588a3a814/bosh.py
MelStructs('CNTO','Ii','items',(FID,'item'),'count'),
MelGroups('items', MelStruct('CNTO','Ii',(FID,'item',None),('count',1)), MelOptStruct('COED','IIf',(FID,'owner',None),(FID,'glob',None),('condition',1.0)), ), MelGroup('destructable', MelBase('DEST','header'), MelStruct('DEST','IhH','health','count','flags'), MelGroups('stages', MelStruct('DSTD','=4B4I','health','index...
# def loadData(self,record,ins,type,size,readId):
7588e0d30dff42efbeec928a58eec430fc6aaf2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/7588e0d30dff42efbeec928a58eec430fc6aaf2b/bosh.py
MelString('DNAM','upperLayer'),
MelString('ANAM','layer2'), MelString('BNAM','layer3'),
def loadData(self,record,ins,type,size,readId): if size == 136: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 124: #--Else 124 byte record (skips sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIffI',size,readId) elif size == 120...
b43ff0ace3688d09572eb3abee8871022a44253e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/b43ff0ace3688d09572eb3abee8871022a44253e/bosh.py
MelStructA('NAM0','3Bs3Bs3Bs3Bs','colors','riseRed','riseGreen','riseBlue',('unused1',null1),
MelBase('LNAM','unknown1'), MelStruct('ONAM','4B','cloudSpeed0','cloudSpeed1','cloudSpeed3','cloudSpeed4'), MelBase('PNAM','_pnam'), MelStructA('NAM0','3Bs3Bs3Bs3Bs','colors', 'riseRed','riseGreen','riseBlue',('unused1',null1),
def loadData(self,record,ins,type,size,readId): if size == 136: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 124: #--Else 124 byte record (skips sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIffI',size,readId) elif size == 120...
b43ff0ace3688d09572eb3abee8871022a44253e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/b43ff0ace3688d09572eb3abee8871022a44253e/bosh.py
MelStruct('FNAM','4f','fogDayNear','fogDayFar','fogNightNear','fogNightFar'), MelStruct('HNAM','14f', 'eyeAdaptSpeed', 'blurRadius', 'blurPasses', 'emissiveMult', 'targetLum', 'upperLumClamp', 'brightScale', 'brightClamp', 'lumRampNoTex', 'lumRampMin', 'lumRampMax', 'sunlightDimmer', 'grassDimmer', 'treeDimmer'),
MelStruct('FNAM','6f','fogDayNear','fogDayFar','fogNightNear','fogNightFar','fogDayPower','fogNightPower'), MelBase('INAM','_inam'),
def loadData(self,record,ins,type,size,readId): if size == 136: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 124: #--Else 124 byte record (skips sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIffI',size,readId) elif size == 120...
b43ff0ace3688d09572eb3abee8871022a44253e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/b43ff0ace3688d09572eb3abee8871022a44253e/bosh.py
recAttrs_class[recClass] = ('model','bodyParts','nift_p','bloodSprayPath','bloodDecalPath')
recAttrs_class[recClass] = ('model','bodyParts','nift_p','bodyPartData','impactDataset')
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4/bosh.py
recAttrs_class[recClass] = ('iconPath','model','effectShader','enchantEffect','light')
recAttrs_class[recClass] = ('iconPath','model','effectShader','objectDisplayShader','light')
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4/bosh.py
recAttrs_class[recClass] = ('imagespaceModifier','light','impactdataset','placedImpactObject')
recAttrs_class[recClass] = ('imageSpaceModifier','light','impactDataset','placedImpactObject')
def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self...
1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/1602f02ee7f2bfcbb76df6342c3fe4951eebf9c4/bosh.py
rgb_str = 'rgb('+str(int(color_intensity))+',0,0)' return ImageColor.getrgb(rgb_str)
color_rgb = color_table[int(log_rebase)] return ImageColor.getrgb(color_table[int(log_rebase)])
def getColor(hit_c): global hit_count_max global hit_count_min global hit_count_logmin global hit_count_logrange log_v = math.floor(math.log(hit_c)/math.log(2)) log_rebase = log_v - hit_count_logmin color_intensity=log_rebase*(255 / hit_count_logrange) rgb_str = 'rgb('+str(int(color_intensity))+',0,0)' return ImageCol...
d2103ddac27dbfbf65406dc52da7c1c8bbd989ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5432/d2103ddac27dbfbf65406dc52da7c1c8bbd989ac/draw_hits.py
for y in range(10):
for y in range(BOTTOM_LEGEND_PX):
def getColor(hit_c): global hit_count_max global hit_count_min global hit_count_logmin global hit_count_logrange log_v = math.floor(math.log(hit_c)/math.log(2)) log_rebase = log_v - hit_count_logmin color_intensity=log_rebase*(255 / hit_count_logrange) rgb_str = 'rgb('+str(int(color_intensity))+',0,0)' return ImageCol...
d2103ddac27dbfbf65406dc52da7c1c8bbd989ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5432/d2103ddac27dbfbf65406dc52da7c1c8bbd989ac/draw_hits.py
print 'NEW POST: %s: %s (%s)' % (entry.title, entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"), feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title.strip()), str(entry.link.strip().replace("http://www...
link = str(entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/")) print 'NEW POST: %s: %s (%s)' % (entry.title, link, feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title), link))
def announce_post(irc, feed, entry): global CHANNEL print 'NEW POST: %s: %s (%s)' % (entry.title, entry.link.replace("http://www.streetgeek.com.au/portal/modules.php?name=Forums&file=viewtopic&p=", "http://fj.streetgeek.com.au/"), feed) irc.action(CHANNEL, 'found a new post on %s: %s: %s' % (str(feed), str(entry.title....
f05ae9855eec1f1cfc94d94ca2b3a82d5debb107 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/f05ae9855eec1f1cfc94d94ca2b3a82d5debb107/feedbot.py
message_buffer.append([event.nick, msg[:200], True])
message_buffer.append([event.nick, event.text[:200], True])
def handle_ctcp(event, match): global message_buffer, MAX_MESSAGES, CHANNEL if event.channel == CHANNEL: if event.args[0] == "ACTION": message_buffer.append([event.nick, msg[:200], True]) message_buffer = message_buffer[-MAX_MESSAGES:] return
c6796adce2c451d38d7e9c2859e79e8253c21d17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/c6796adce2c451d38d7e9c2859e79e8253c21d17/regexbot.py
self.channels.remove(channel)
del self.channels[channel.name]
def cleanup(self): # do some cleanup tasks to free some memory # hopefully python's resource counter will properly detect the object as something # that can be disposed of to_delete = [] for channel in self.channels.values(): if len(channel.members) == 0: to_delete.append(channel) for channel in to_delete: self.channe...
fd98a3b7022274a1a915b3ff0bd2947a307d5e02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/fd98a3b7022274a1a915b3ff0bd2947a307d5e02/ircserver.py
global message_buffer, MAX_MESSAGES, last_message, flooders nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): parts = msg.split('/') now = datetime.now() delta = now - last_message last_message = now if delta < timedelta(seconds=5): print "Flood protection hit, %s of %s ...
global message_buffer, MAX_MESSAGES, last_message, flooders nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): parts = msg.split('/') now = datetime.now() delta = now - last_message last_message = now if delta < timedelta(seconds=5): print "Flood protection hit, %s of %s ...
def handle_pubmsg(connection, event): global message_buffer, MAX_MESSAGES, last_message, flooders nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): # handle regex parts = msg.split('/') # now flood protect! now = datetime.now() delta = now - last_message last_message = now i...
b21e4d678345680c33ac870ee5252aadec4f39cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/b21e4d678345680c33ac870ee5252aadec4f39cd/regexbot.py
self.bind(self._welcome_join, RPL_WELCOME)
def start_channels(self, chans): self._startChannels = chans self.bind(self._welcome_join, RPL_WELCOME)
eeb0349375e3d2a1722a315937eeb1f62d544449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/eeb0349375e3d2a1722a315937eeb1f62d544449/ircasync.py
e = re.compile(parts[1], re.I)
e = re.compile(parts[1])
def handle_pubmsg(connection, event): global message_buffer, MAX_MESSAGES, last_message nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): # handle regex parts = msg.split('/') # now flood protect! now = datetime.now() delta = now - last_message last_message = now if delta < ...
a51c581d30c1bd3b7ad4b1ec6125aa250377c9d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/a51c581d30c1bd3b7ad4b1ec6125aa250377c9d0/regexbot.py
else:
else:
def handle_pubmsg(connection, event): global message_buffer, MAX_MESSAGES, last_message, flooders nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): # handle regex parts = msg.split('/') # now flood protect! now = datetime.now() delta = now - last_message last_message = now i...
a1d6a0a9c6b7ff66d12e92192ca8e04c00eb9909 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/a1d6a0a9c6b7ff66d12e92192ca8e04c00eb9909/regexbot.py
self.textures.append(tex.name)
print(tex.name) texObj = texList.getTexture(tex.name) if(texObj != None): print(texObj.name + " " + texObj.fileName) self.textures.append(texObj.fileName)
def populate(self, obj, texList): self.name = obj.name.replace(".", "_")
7f0f64079fbcfd35c5688e5f581937044eb29435 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6146/7f0f64079fbcfd35c5688e5f581937044eb29435/dnt_cal3d_export.py
f.write("<MATERIAL NUMMAPS\"" + str(len(self.textures)) + "\">\n")
f.write("<MATERIAL NUMMAPS=\"" + str(len(self.textures)) + "\">\n")
def save(self, directory):
7f0f64079fbcfd35c5688e5f581937044eb29435 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6146/7f0f64079fbcfd35c5688e5f581937044eb29435/dnt_cal3d_export.py
self.textures = cal3dTextures()
def getModel(self):
7f0f64079fbcfd35c5688e5f581937044eb29435 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6146/7f0f64079fbcfd35c5688e5f581937044eb29435/dnt_cal3d_export.py
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
print "new post '%s' created" % fname
print "new post '%s' created" % fname
def prettify_title(title): title = title.lower() title = NON_CHAR.sub('-', title) return title
3b670dc1419c7db911653fefb35f90e3b1fbd776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14332/3b670dc1419c7db911653fefb35f90e3b1fbd776/_newpost.py
return min(voltage_color_list, key=(lambda a: xyYnorm(a[1])))
return min(voltage_color_list, key=(lambda a: xyYnorm(xyYdiff(a[1], target_color))))
def findBestColor(measured_color_red, measured_color_green, measured_color_blue, target_color): """ findBestColor returns a color, which is nearest targetColor. * measured_color -- contains the measured colors for each channel * target_color """ voltage_color_list = [] voltage_color_list.extend( measured_color_red ) vo...
c86babeb893d16839419d227b4fe18d7dd4f005f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12788/c86babeb893d16839419d227b4fe18d7dd4f005f/iterativeColorTubes.py
if not distro: distro = chkdistro
def info(self, pkg, chkdistro): if not pkg.strip(): return '' _pkg = ''.join([x for x in pkg.strip().split(None,1)[0] if x.isalnum() or x in '.-_+']) if len(pkg.strip().split()) > 1: distro = ''.join([x for x in pkg.strip().split(None,2)[1] if x.isalnum() or x in '-._+']) if not distro: distro = chkdistro if distro not...
a720d019a434fc3751f5d661c7d8d5235b58d98a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/a720d019a434fc3751f5d661c7d8d5235b58d98a/packages.py
conf.registerPlugin('PackageInfo', True)
PackageInfo = conf.registerPlugin('PackageInfo', True)
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
7c5d0366292f9cffa93d7597f25d76b78d284048 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/7c5d0366292f9cffa93d7597f25d76b78d284048/config.py
if user and text[0] in str(conf.supybot.reply.whenAddressedBy.get('chars')):
if user and text[0] in list(conf.supybot.reply.whenAddressedBy.chars()):
def privmsg(self, irc, msg, user): channel = self.__getChannel(msg.args[0]) text = self.space_re.subn(' ', msg.args[1].strip())[0] if text[0] == self.registryValue("prefixchar"): text = text[1:].strip() if user and text[0] in str(conf.supybot.reply.whenAddressedBy.get('chars')): return (cmd, rest) = (text.split(' ', 1)...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if cmd not in ("find", "info"):
if cmd not in my_commands:
def privmsg(self, irc, msg, user): channel = self.__getChannel(msg.args[0]) text = self.space_re.subn(' ', msg.args[1].strip())[0] if text[0] == self.registryValue("prefixchar"): text = text[1:].strip() if user and text[0] in str(conf.supybot.reply.whenAddressedBy.get('chars')): return (cmd, rest) = (text.split(' ', 1)...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if cmd not in ("find", "info"):
if cmd not in my_commands:
def chanmsg(self, irc, msg, user): channel = self.__getChannel(msg.args[0]) text = self.space_re.subn(' ', msg.args[1].strip())[0] if text[0] != self.registryValue("prefixchar", channel): return text = text[1:] (cmd, rest) = (text.split(' ', 1) + [None])[:2] if cmd not in ("find", "info"): return if not rest: return (t...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if user: return msg channel = self.__getChannel(msg.args[0])
channel = self.__getChannel(msg.args[0]) reply_chars = tuple([self.registryValue("prefixchar", channel)] + list(conf.supybot.reply.whenAddressedBy.chars.get(channel))) my_commands = self.listCommands() if user if not channel and text[0] == self.registryValue("prefixchar") msg.args = (msg.args[0], text[1:]) return msg
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if text[0] not in ('!', '@'):
if text[0] not in reply_chars:
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if not text[1:5] in ("info", "find"):
if not text[1:5] in my_commands:
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
if text[1] in ('!', '@'): if text[1:5] in ("info", "find"):
if text[1] in reply_chars: if text[1:5] in my_commands:
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
elif text[:4] in ("info", "find"):
elif text[:4] in my_commands:
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py
"""
""" % (release, release)
def makeSource(release): return """deb http://archive.ubuntu.com/ubuntu/ %s main restricted universe multiverse
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
aptdir = something("Which directory should be used for the apt cache when looking up packages?", default=supybot.directories.data.dirize('aptdir'))
aptdir = something("Which directory should be used for the apt cache when looking up packages?", default=conf.supybot.directories.data.dirize('aptdir'))
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
while aptdir.beginswith('/var'):
while aptdir.startswith('/var'):
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
aptdir = something("Which directory should be used for the apt cache when looking up packages?", default=supybot.directories.data.dirize('aptdir'))
aptdir = something("Which directory should be used for the apt cache when looking up packages?", default=conf.supybot.directories.data.dirize('aptdir'))
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
for release in default_dist:
try: os.makedirs(aptdir) except OSError: pass for release in default_dists:
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
fd = fileutils.open(filename)
fd = open(filename, 'wb')
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
release = "%s-%s" % sub filename = os.path.join(aptdir, "%s.list" % release)
sub_release = "%s-%s" % (release, sub) filename = os.path.join(aptdir, "%s.list" % sub_release)
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
fd = fileutils.open(filename)
fd = open(filename, 'wb')
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
fd.write(makeSource(release))
fd.write(makeSource(sub_release))
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
(e, o) = commands.getstatusoutput(update_apt) if e != 0:
if commands.getstatus(update_apt) != 0:
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
(e, o) = commands.statusoutput('which apt-file') if e != 0:
if commands.getstatusoutput('which apt-file') != 0:
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
(e, o) = commands.getstatusoutput(update_apt_file) if e != 0:
if commands.getstatusoutput(update_apt_file) != 0:
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py
aptdir = supybot.directories.data.dirize('aptdir')
aptdir = conf.supybot.directories.data.dirize('aptdir')
def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default)
b28db494de1ebb6f5185c7a20132329457a1deb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b28db494de1ebb6f5185c7a20132329457a1deb4/config.py
queue(irc, args[0], reply)
queue(irc, msg.args[0], reply)
def real_info(self, irc, msg, args, package, release): """<package> [<release>]
59f58000914452fe778d6225057ae0914d4a8435 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/59f58000914452fe778d6225057ae0914d4a8435/plugin.py
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text...
59f58000914452fe778d6225057ae0914d4a8435 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/59f58000914452fe778d6225057ae0914d4a8435/plugin.py
if user if not channel and text[0] == self.registryValue("prefixchar")
if user: if not channel and text[0] == self.registryValue("prefixchar"):
def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) channel = self.__getChannel(msg.args[0]) reply_chars = tuple([self.registryValue("prefixchar", channel)] + list(conf.supybot....
dacccac2a69bf7a655ced3b781676e010e56baa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/dacccac2a69bf7a655ced3b781676e010e56baa1/plugin.py
ztc.installPackage(zopyx.imgmap)
ztc.installPackage(zopyx.tinymceplugins.imgmap)
def setUp(cls): fiveconfigure.debug_mode = True ztc.installPackage(zopyx.imgmap) fiveconfigure.debug_mode = False
4da80d3fffb82f9a235c7bbd3d0b21a56794419f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/4da80d3fffb82f9a235c7bbd3d0b21a56794419f/tests.py
def test_suite(): return unittest.TestSuite([ # Unit tests #doctestunit.DocFileSuite( # 'README.txt', package='zopyx.imgmap', # setUp=testing.setUp, tearDown=testing.tearDown), #doctestunit.DocTestSuite( # module='zopyx.imgmap.mymodule', # setUp=testing.setUp, tearDown=testing.tearDown), # Integration t...
4da80d3fffb82f9a235c7bbd3d0b21a56794419f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/4da80d3fffb82f9a235c7bbd3d0b21a56794419f/tests.py
def test_suite(): return unittest.TestSuite([ # Unit tests #doctestunit.DocFileSuite( # 'README.txt', package='zopyx.imgmap', # setUp=testing.setUp, tearDown=testing.tearDown), #doctestunit.DocTestSuite( # module='zopyx.imgmap.mymodule', # setUp=testing.setUp, tearDown=testing.tearDown), # Integration t...
4da80d3fffb82f9a235c7bbd3d0b21a56794419f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/4da80d3fffb82f9a235c7bbd3d0b21a56794419f/tests.py
def test_suite(): return unittest.TestSuite([ # Unit tests #doctestunit.DocFileSuite( # 'README.txt', package='zopyx.imgmap', # setUp=testing.setUp, tearDown=testing.tearDown), #doctestunit.DocTestSuite( # module='zopyx.imgmap.mymodule', # setUp=testing.setUp, tearDown=testing.tearDown), # Integration t...
4da80d3fffb82f9a235c7bbd3d0b21a56794419f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/4da80d3fffb82f9a235c7bbd3d0b21a56794419f/tests.py
def test_suite(): return unittest.TestSuite([ # Unit tests #doctestunit.DocFileSuite( # 'README.txt', package='zopyx.imgmap', # setUp=testing.setUp, tearDown=testing.tearDown), #doctestunit.DocTestSuite( # module='zopyx.imgmap.mymodule', # setUp=testing.setUp, tearDown=testing.tearDown), # Integration t...
4da80d3fffb82f9a235c7bbd3d0b21a56794419f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/4da80d3fffb82f9a235c7bbd3d0b21a56794419f/tests.py
for anchor in soup.find('a'):
for anchor in soup.findAll('a'):
def __call__(self):
3f42bfa1618087db955e128b1d6add324f76d38f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/3f42bfa1618087db955e128b1d6add324f76d38f/document.py
result.append(dict(name=name, text=text)) return
result.append(dict(name=name, text=name)) return demjson.encode(result)
def __call__(self):
3f42bfa1618087db955e128b1d6add324f76d38f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6136/3f42bfa1618087db955e128b1d6add324f76d38f/document.py
def create_button(self, button_name): button = QPushButton(button_name) button.setFlat(True) button.setCheckable(True) button.clicked.connect(self.clickedButton) return button def update_label_buttons(self): label_vlayout = self.create_choice_list("Labels") self.label_buttongroup = QButtonGroup() for label_name in se...
def __init__(self, parent=None): QWidget.__init__(self, parent)
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
self.hlayout.addLayout(label_vlayout)
self.hlayout.setAlignment(Qt.AlignLeft) self.hlayout.addWidget(self.label_button_list)
def update_label_buttons(self): label_vlayout = self.create_choice_list("Labels") self.label_buttongroup = QButtonGroup() for label_name in self.label_names: button = QPushButton(label_name) button.setFlat(True) button.setCheckable(True) button.clicked.connect(self.clickedLabelButton) label_vlayout.addWidget(button) se...
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
print self.hlayout.parent()
def init_button_lists(self): for label_name in self.label_names: button = self.label_button_list.add_button(label_name) button.clicked.connect(self.clickedLabelButton)
def update_label_buttons(self): label_vlayout = self.create_choice_list("Labels") self.label_buttongroup = QButtonGroup() for label_name in self.label_names: button = QPushButton(label_name) button.setFlat(True) button.setCheckable(True) button.clicked.connect(self.clickedLabelButton) label_vlayout.addWidget(button) se...
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
def update_buttons(self): layout = self.hlayout.takeAt(1) for button in self.property_buttons: button.hide() del button
for key, property_values in self.properties.iteritems(): if key in ["type", "class"]: continue button_list = ButtonListWidget(key) for value in property_values: button_list.add_button(value) button_list.hide() print key self.property_button_lists[key] = button_list self.hlayout.addWidget(button_list)
def update_buttons(self): layout = self.hlayout.takeAt(1) for button in self.property_buttons: button.hide() del button
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
dynamic_hlayout = QHBoxLayout() self.property_buttons = [] if self.last_checked_label != None: for key in self.label_properties[self.last_checked_label].keys(): if key in ["type", "class"]: continue vlayout = self.create_choice_list(key) buttongroup = QButtonGroup() for value in self.properties[key]: button = self.cr...
def show_only_label_properties(self, label_name): print "sdf", self.property_button_lists for name, button_list in self.property_button_lists.iteritems(): if name in self.label_properties[label_name].keys(): button_list.show() else: button_list.hide()
def update_buttons(self): layout = self.hlayout.takeAt(1) for button in self.property_buttons: button.hide() del button
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
return self.label_buttongroup.checkedButton() def create_choice_list(self, list_name, elements = []): vlayout = QVBoxLayout() vlayout.setSpacing(0) vlayout.addWidget(QLabel("<center><b>" + list_name + "</b></center>")) if len(elements) > 0: buttongroup = QButtonGroup() for element in elements: self.create_button(ele...
return self.label_button_list.get_checked_button()
def get_checked_label_button(self): return self.label_buttongroup.checkedButton()
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py