rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
char.socket.clilocmessage(500313) | char.socket.clilocmessage(500312) | def validCorpseTarget( char, target ): if not target: return 0 if not char.gm and not char.canreach( target, 2 ): char.socket.clilocmessage(500313) return 0 if target.id != 0x2006: char.socket.clilocmessage(500971) return 0 # Check Owner if not target.owner or not target.owner.dead: char.socket.clilocmessage(500971)... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.socket.clilocmessage(500971) | char.socket.clilocmessage(500970) | def validCorpseTarget( char, target ): if not target: return 0 if not char.gm and not char.canreach( target, 2 ): char.socket.clilocmessage(500313) return 0 if target.id != 0x2006: char.socket.clilocmessage(500971) return 0 # Check Owner if not target.owner or not target.owner.dead: char.socket.clilocmessage(500971)... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.socket.clilocmessage(500971) | char.socket.clilocmessage(500970) | def validCorpseTarget( char, target ): if not target: return 0 if not char.gm and not char.canreach( target, 2 ): char.socket.clilocmessage(500313) return 0 if target.id != 0x2006: char.socket.clilocmessage(500971) return 0 # Check Owner if not target.owner or not target.owner.dead: char.socket.clilocmessage(500971)... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
if not target.poison and target.health >= target.maxhitpoints: | if not target.poison > -1 and target.health >= target.maxhitpoints: | def validCharTarget( char, target ): # Do we have a valid target if not target: char.socket.sysmessage( 'You have to target a living thing.' ) return 0 if not char.canreach( target, 2 ): char.socket.sysmessage( 'You are too far away to apply bandages on %s' % target.name ) return 0 # Already at full health if not tar... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.socket.clilocmessage(1061289) else: char.socket.clilocmessage(500956) | char.socket.clilocmessage(1061288) else: char.socket.clilocmessage(500955) | def validCharTarget( char, target ): # Do we have a valid target if not target: char.socket.sysmessage( 'You have to target a living thing.' ) return 0 if not char.canreach( target, 2 ): char.socket.sysmessage( 'You are too far away to apply bandages on %s' % target.name ) return 0 # Already at full health if not tar... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.socket.clilocmessage(1002086) | char.socket.sysmessage("1") | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.socket.clilocmessage(1002086) return if target.char and target.char.poison and ( char.skill[ HEALING ] < 600 or char.skill[ ANATOMY ] < 600 ): char.socket.clilocmessage(1002086) | char.socket.sysmessage("You are not skilled enough for that.") return if target.char and target.poison > -1 and ( char.skill[ HEALING ] < 600 or char.skill[ ANATOMY ] < 600 ): char.socket.sysmessage("You are not skilled enough for that.") | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
if not corpse and not target.char.dead and not target.char.poison: | if not corpse and not target.char.dead and not target.char.poison > -1: | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.addtimer( random.randint( 2500, 5000 ), 'bandages.bandage_timer', [ 2, success, target.char.serial, baseid ] ) | char.addtimer( random.randint( 5000, 10000 ), 'bandages.bandage_timer', [ 2, success, target.char.serial, baseid ] ) | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) | if target.char.poison > -1: char.addtimer( random.randint( 4000, 7000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) else: char.addtimer( random.randint( 3000, 6000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) | if target.char.poison > -1: char.addtimer( random.randint( 3000, 4000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) else: char.addtimer( random.randint( 1500, 3000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) | def bandage_response( char, args, target ): corpse = None if target.item: if validCorpseTarget( char, target.item ): corpse = target.item else: return elif target.char and not validCharTarget( char, target.char ): return elif not target.char: char.socket.sysmessage( 'You have to target either a corpse or a creature.... | f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py |
for char in wholist[:10]: | wholist = wholist[:10] for char in wholist: | def showWhoGump(player, page): # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfpack.sockets.next() c... | eecc5e86e1e0109109b39ab301b223d12fadd404 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/eecc5e86e1e0109109b39ab301b223d12fadd404/who.py |
gump.setArgs( [ page ] ) | gump.setArgs( [ current_page ] ) | def showWhoGump(player, page): # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfpack.sockets.next() c... | eecc5e86e1e0109109b39ab301b223d12fadd404 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/eecc5e86e1e0109109b39ab301b223d12fadd404/who.py |
blooditem.decay = 1 | basedef = wolfpack.charbase(corpse.charbaseid) | cc1c1c62b51c74873b3b4487d44bf8d1f34b96d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/cc1c1c62b51c74873b3b4487d44bf8d1f34b96d2/blades.py | |
potion.delete() bottle = wolfpack.additem( 'f0e' ) if not tobackpack( bottle, char ): bottle.update() | potions.consumePotion(char, potion, True) | def poisonit( char, args ): potion = wolfpack.finditem(args[ 0 ]) item = wolfpack.finditem(args[ 1 ]) if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(0), normal, greater, deadly(3) strength = int( potion.gettag( 'potiontype' ) ) - 14 # consume the potion / add a blank bot... | fb9d7a78d2b0a9ef7831537b42ddddede81f3d37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/fb9d7a78d2b0a9ef7831537b42ddddede81f3d37/poisoning.py |
dispelChance = 50.0 + (100 * ((char.magery / 10.0 - (target.getintproperty('dispeldifficulty', 1) / 10)) / ((target.getintproperty('dispelfocus', 1) / 10) * 2))) / 100.0 | dispelChance = 50.0 + (100 * ((char.magery / 10.0 - (target.getintproperty('dispeldifficulty', 1) / 10.0)) / ((target.getintproperty('dispelfocus', 1) / 10.0) * 2))) / 100.0 | def effect(self, char, target, mode, args, item): dispelChance = 50.0 + (100 * ((char.magery / 10.0 - (target.getintproperty('dispeldifficulty', 1) / 10)) / ((target.getintproperty('dispelfocus', 1) / 10) * 2))) / 100.0 | fcde68c0cca3b77dbea0a32da8950dd4be60a244 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/fcde68c0cca3b77dbea0a32da8950dd4be60a244/circle6.py |
if not potiontype in potions: | if not potiontype in POTIONS: | def onUse( char, item ): socket = char.socket # Potions need to be on your body to use them, or in arms reach. if item.getoutmostchar() != char: char.message( "This potion is out of your reach..." ) return False # Lets make sure the tag exists. if not item.hastag( 'potiontype' ): return False else: potiontype = item.g... | 119915bffecf514d11b1933f6d521c4541c6ca27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/119915bffecf514d11b1933f6d521c4541c6ca27/potions.py |
energydamage(target, char, damage, fire=100) | energydamage(target, char, damage, fire=100 ) | def potiondamage( char, target, potion, dmgbonus ): if potion.gettag('potiontype') == 11: damage = randint(POTION_LESSEREXPLOSION_RANGE[0], POTION_LESSEREXPLOSION_RANGE[1]) elif potion.gettag('potiontype') == 12: damage = randint(POTION_EXPLOSION_RANGE[0], POTION_EXPLOSION_RANGE[1]) elif potion.gettag('potiontype') == ... | 119915bffecf514d11b1933f6d521c4541c6ca27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/119915bffecf514d11b1933f6d521c4541c6ca27/potions.py |
if len( content.strip() ) == 0: | if not content or len(content.strip()) == 0: | def onBookUpdatePage(char, item, page, content): if item.hastag('protected'): char.message('This book is read only.') return if item.hastag( 'pages' ): pages = int(item.gettag('pages')) else: pages = 64 if page > pages or page < 1: return if len( content.strip() ) == 0: item.deltag('page%u' % page) return item.sett... | d8b9623914e6f7a6e6302469c99d77d7e9c550c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d8b9623914e6f7a6e6302469c99d77d7e9c550c0/book.py |
return _wolfpack.statics( x, y, map, range ) | return _wolfpack.statics( x, y, map, exact ) | def statics( x, y, map, exact=1 ): if not type( x ) is IntType or not type( y ) is IntType or not type( map ) is IntType or not type( exact ) is IntType: raise TypeError, "x, y and map need to be integer values" else: return _wolfpack.statics( x, y, map, range ) | 9f724420f5908beeca20cf92a2f33d73b9400e24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f724420f5908beeca20cf92a2f33d73b9400e24/__init__.py |
def statics( x, y, map ): return _wolfpack.statics( x, y, map ) | def statics( x, y, map ): return _wolfpack.statics( x, y, map ) | 9f724420f5908beeca20cf92a2f33d73b9400e24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f724420f5908beeca20cf92a2f33d73b9400e24/__init__.py | |
if mode == MODE_EQUAL and z == z0: | if mode == MODE_NONE: items.append( item ) elif mode == MODE_EQUAL and z == z0: | def tileResponse(player, arguments, target): if( len(arguments) < 7 ): player.socket.sysmessage( "Please select the second corner." ) player.socket.attachtarget( "commands.tilemove.tileResponse", list(arguments) + [target.pos] ) return socket = player.socket xmod = int( arguments[0] ) ymod = int( arguments[1] ) zmod =... | 982b22c25d13315b70fbbdc6c5437c821a59ae01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/982b22c25d13315b70fbbdc6c5437c821a59ae01/tilemove.py |
return 1 | return True | def onWearItem(player, wearer, item, layer): lower = properties.fromitem(item, LOWERREQS) / 100.0 req_str = item.getintproperty( 'req_strength', 0 ) if item.hastag( 'req_strength' ): req_str = int( item.gettag( 'req_strength' ) ) if lower: req_str = int(ceil(req_str) * (1.0 - lower)) req_dex = item.getintproperty( 'r... | 3e917b08ed29ff19208c75afb9ccb7001d84d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/3e917b08ed29ff19208c75afb9ccb7001d84d066/equipment.py |
return 1 | return True | def onWearItem(player, wearer, item, layer): lower = properties.fromitem(item, LOWERREQS) / 100.0 req_str = item.getintproperty( 'req_strength', 0 ) if item.hastag( 'req_strength' ): req_str = int( item.gettag( 'req_strength' ) ) if lower: req_str = int(ceil(req_str) * (1.0 - lower)) req_dex = item.getintproperty( 'r... | 3e917b08ed29ff19208c75afb9ccb7001d84d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/3e917b08ed29ff19208c75afb9ccb7001d84d066/equipment.py |
return 1 | return True | def onWearItem(player, wearer, item, layer): lower = properties.fromitem(item, LOWERREQS) / 100.0 req_str = item.getintproperty( 'req_strength', 0 ) if item.hastag( 'req_strength' ): req_str = int( item.gettag( 'req_strength' ) ) if lower: req_str = int(ceil(req_str) * (1.0 - lower)) req_dex = item.getintproperty( 'r... | 3e917b08ed29ff19208c75afb9ccb7001d84d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/3e917b08ed29ff19208c75afb9ccb7001d84d066/equipment.py |
return 1 return 0 | return True return False | def onWearItem(player, wearer, item, layer): lower = properties.fromitem(item, LOWERREQS) / 100.0 req_str = item.getintproperty( 'req_strength', 0 ) if item.hastag( 'req_strength' ): req_str = int( item.gettag( 'req_strength' ) ) if lower: req_str = int(ceil(req_str) * (1.0 - lower)) req_dex = item.getintproperty( 'r... | 3e917b08ed29ff19208c75afb9ccb7001d84d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/3e917b08ed29ff19208c75afb9ccb7001d84d066/equipment.py |
target.char.baseid = 'sheep' | target.char.baseid = 'sheep_sheered' | def docarve( char, item, target ): # Corpse => Carve # Wood => Kindling/Logs model = 0 if target.item: if carve_item( char, item, target ): return else: model = target.item.id # This is for sheering only elif target.char and target.char.npc: if target.char.baseid == 'sheep_unsheered': target.char.id = 223 target.char... | c86556594e21613a14ea8593f9f9a5e3607b1b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/c86556594e21613a14ea8593f9f9a5e3607b1b36/blades.py |
elif target.char.baseid == 'sheep': | elif target.char.baseid == 'sheep' or target.char.baseid == 'sheep_sheered': | def docarve( char, item, target ): # Corpse => Carve # Wood => Kindling/Logs model = 0 if target.item: if carve_item( char, item, target ): return else: model = target.item.id # This is for sheering only elif target.char and target.char.npc: if target.char.baseid == 'sheep_unsheered': target.char.id = 223 target.char... | c86556594e21613a14ea8593f9f9a5e3607b1b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/c86556594e21613a14ea8593f9f9a5e3607b1b36/blades.py |
if skills.skilltable[ DETECTHIDDEN ][ skills.UNHIDE ] and char.hidden: | if skills.skilltable[ DETECTINGHIDDEN ][ skills.UNHIDE ] and char.hidden: | def response( char, args, target ): if not char: return if skills.skilltable[ DETECTHIDDEN ][ skills.UNHIDE ] and char.hidden: char.removefromview() char.hidden = False char.update() # if we are in our house : reveal all hidden chars in this house # w/o checking skill house = wolfpack.findmulti( char.pos ) # it's our... | 0bbf97debc034104ac1df62cc71e055bc0eb9126 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0bbf97debc034104ac1df62cc71e055bc0eb9126/detectinghidden.py |
self.stream.write("\\texttt{%s}%s & %s & %s\\\\\n"%(var['name'],load,var['long_name'], | self.stream.write("\\texttt{%s}%s & %s & %s\\\\\n"%(var['name'].replace('_','\_'),load,var['long_name'].replace('_','\_'), | def print_var(self, var): """Write single variable block to stream for ncdf_params.""" | fd8ddf1af9986f176aa14b1e82ba4052a0ec8903 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/fd8ddf1af9986f176aa14b1e82ba4052a0ec8903/generate_ncvars.py |
out[i+1] = out[i+1]+'\t %f%%'%(100.*(stats[i]-stats_comp[i])/(abs(stats_comp[i]))) | if i==4: out[i+1] = out[i+1]+'\t %f'%(stats[i]-stats_comp[i]) else: out[i+1] = out[i+1]+'\t %f%%'%(100.*(stats[i]-stats_comp[i])/(abs(stats_comp[i]))) | def getstats(cffile,time, eismint=False): """Get ice statistics. cffile: CF file object time: time slice to be processed eismint: set to True if it's an EISMINT 2 test (default: False) returns a Numeric array: [volume, area, melt fraction] if it's an eismint 2 file, then the array contains additionally [...,divide th... | ad1ca5256451b0ea9a703b75d1d61fc848207d9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/ad1ca5256451b0ea9a703b75d1d61fc848207d9f/extractCFstats.py |
varx[:] = (delta[0]*Numeric.arange(numx-1)).astype(Numeric.Float32) | varx[:] = ((delta[0]*Numeric.arange(numx-1)+(delta[0]/2))+origin[0]).astype(Numeric.Float32) | def usage(): "print short help message" print 'Usage: a2c.py [OPTIONS] infile outfile' print 'create a radial CF topography file based on Sine wave.' print 'infile = input ascii file e.g. input.asc' print 'outfile = output netCDF file e.g. output.nc' print '' print ' -h, --help\n\tthis message' print ' -p, --project... | d9cf8d1e04ecc9cc323648e9305ac9841c4ee648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/d9cf8d1e04ecc9cc323648e9305ac9841c4ee648/a2c.py |
varx[:] = (delta[0]*Numeric.arange(numx)).astype(Numeric.Float32) | varx[:] = ((delta[0]*Numeric.arange(numx))+origin[0]).astype(Numeric.Float32) | def usage(): "print short help message" print 'Usage: a2c.py [OPTIONS] infile outfile' print 'create a radial CF topography file based on Sine wave.' print 'infile = input ascii file e.g. input.asc' print 'outfile = output netCDF file e.g. output.nc' print '' print ' -h, --help\n\tthis message' print ' -p, --project... | d9cf8d1e04ecc9cc323648e9305ac9841c4ee648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/d9cf8d1e04ecc9cc323648e9305ac9841c4ee648/a2c.py |
vary[:] = (delta[1]*Numeric.arange(numy-1)).astype(Numeric.Float32) | vary[:] = ((delta[1]*Numeric.arange(numy-1)+(delta[1]/2))+origin[1]).astype(Numeric.Float32) | def usage(): "print short help message" print 'Usage: a2c.py [OPTIONS] infile outfile' print 'create a radial CF topography file based on Sine wave.' print 'infile = input ascii file e.g. input.asc' print 'outfile = output netCDF file e.g. output.nc' print '' print ' -h, --help\n\tthis message' print ' -p, --project... | d9cf8d1e04ecc9cc323648e9305ac9841c4ee648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/d9cf8d1e04ecc9cc323648e9305ac9841c4ee648/a2c.py |
vary[:] = (delta[1]*Numeric.arange(numy)).astype(Numeric.Float32) | vary[:] = ((delta[1]*Numeric.arange(numy))+origin[1]).astype(Numeric.Float32) | def usage(): "print short help message" print 'Usage: a2c.py [OPTIONS] infile outfile' print 'create a radial CF topography file based on Sine wave.' print 'infile = input ascii file e.g. input.asc' print 'outfile = output netCDF file e.g. output.nc' print '' print ' -h, --help\n\tthis message' print ' -p, --project... | d9cf8d1e04ecc9cc323648e9305ac9841c4ee648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/d9cf8d1e04ecc9cc323648e9305ac9841c4ee648/a2c.py |
self.params['lon_0'] = var.longitude_of_central_meridian[0] | self.params['lon_0'] = var.longitude_of_projection_origin[0] | def __init__(self,var): """Initialise. var: CF grid mapping variable.""" CFProj.__init__(self,var) self.params['proj'] = 'stere' # polar variation if var.grid_mapping_name == 'polar_stereographic': self.params['lon_0'] = var.straight_vertical_longitude_from_pole[0] self.params['lat_0'] = var.latitude_of_projection_ori... | 8fb580c0ef581c8168bcbe1096541500cd3be115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/8fb580c0ef581c8168bcbe1096541500cd3be115/CF_proj.py |
proj.longitude_of_central_meridian = [float(ps[0])] | proj.longitude_of_projection_origin = [float(ps[0])] | def CFProj_parse_GMTproj(projstring): """Parse GMT projection string.""" proj = DummyProj() ps = projstring[1:].split('/') if projstring[0] in ['b','B']: if len(ps) != 4: print 'Error, wrong number of projection arguments' usage() sys.exit(1) proj.grid_mapping_name='albers_conical_equal_area' proj.longitude_of_centra... | 8fb580c0ef581c8168bcbe1096541500cd3be115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/8fb580c0ef581c8168bcbe1096541500cd3be115/CF_proj.py |
proj.longitude_of_central_meridian = [long_central] | proj.longitude_of_projection_origin = [long_central] | def CFProj_parse_ESRIprj(pFile): """Parse an ESRI projection file. pFile: file object.""" proj = DummyProj() pName = pFile.readline() pName=pName[14:] pStrip = string.strip(pName) if pStrip == 'ALBERS': proj.grid_mapping_name='albers_conical_equal_area' line = pFile.readline() while line != '': line = pFile.readli... | 8fb580c0ef581c8168bcbe1096541500cd3be115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/8fb580c0ef581c8168bcbe1096541500cd3be115/CF_proj.py |
eis = PyCF.CFgetstats(cffile,-1,eismint=True) - comp | eis = PyCF.CFgetstats(cffile,-1,eismint=True) eis = eis - comp | def coordsystem(self): """Plot coordinate system""" | f8bb73dfbccc5c05043443f5d6ad470728e0b963 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/f8bb73dfbccc5c05043443f5d6ad470728e0b963/plotEISMINT2stats.py |
eis[i]=eis[i]/abs(comp[i]) | eis[i]=100.*eis[i]/abs(comp[i]) | def coordsystem(self): """Plot coordinate system""" | f8bb73dfbccc5c05043443f5d6ad470728e0b963 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/f8bb73dfbccc5c05043443f5d6ad470728e0b963/plotEISMINT2stats.py |
if 'spot' not in v and v not in ['level','x0','y0','x1','y1']: | if 'spot' not in v and v not in ['VARSET','level','x0','y0','x1','y1']: | def createVariable(self,name): """Create a CF variable. | 1cfe10e5c4b5da5d91a6112f8ea6069c67d67025 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/1cfe10e5c4b5da5d91a6112f8ea6069c67d67025/CF_createfile.py |
prog.write('\"%s\"'%configname) | prog.write('\"%s\"\n'%configname) | def get_gmtdate(): """Get current date.""" d = time.gmtime() return '%d-%d-%d_%d:%d'%(d[0],d[1],d[2],d[3],d[4]) | 471cb4d67c1f2124a7e285cf720a48ea153bdf08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2666/471cb4d67c1f2124a7e285cf720a48ea153bdf08/glide_launch.py |
r, self.namespace = self.transport.call(self.proxy, m, ns, sa, encoding = self.encoding, http_proxy = self.http_proxy, config = self.config) | r, self.namespace = self.transport.call(self.proxy, m, ns, sa, encoding = self.encoding, http_proxy = self.http_proxy, config = self.config) | def __call(self, name, args, kw, ns = None, sa = None, hd = None, ma = None): | 065e7c22efd194cd6a17d02522ce0bffa825769d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/065e7c22efd194cd6a17d02522ce0bffa825769d/Client.py |
print r | def __call(self, name, args, kw, ns = None, sa = None, hd = None, ma = None): | 065e7c22efd194cd6a17d02522ce0bffa825769d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/065e7c22efd194cd6a17d02522ce0bffa825769d/Client.py | |
except xml.sax.SAXParseException: | except xml.sax.SAXParseException, e: | def _parseSOAP(xml_str, rules = None): try: from cStringIO import StringIO except ImportError: from StringIO import StringIO parser = xml.sax.make_parser() t = SOAPParser(rules = rules) parser.setContentHandler(t) e = xml.sax.handler.ErrorHandler() parser.setErrorHandler(e) inpsrc = xml.sax.xmlreader.InputSource() in... | b02715cbf9bc86e65514f4a082aa9da54de825d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/b02715cbf9bc86e65514f4a082aa9da54de825d9/SOAP.py |
raise e | def _parseSOAP(xml_str, rules = None): try: from cStringIO import StringIO except ImportError: from StringIO import StringIO parser = xml.sax.make_parser() t = SOAPParser(rules = rules) parser.setContentHandler(t) e = xml.sax.handler.ErrorHandler() parser.setErrorHandler(e) inpsrc = xml.sax.xmlreader.InputSource() in... | b02715cbf9bc86e65514f4a082aa9da54de825d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/b02715cbf9bc86e65514f4a082aa9da54de825d9/SOAP.py | |
def serialize(self, sw, pyobj, name=None, attrtext='', **kw): | def serialize(self, sw, pyobj, name=None, attrtext='', unsuppressedPrefixes=[], **kw): | def serialize(self, sw, pyobj, name=None, attrtext='', **kw): if not self.wrapped: Canonicalize(pyobj, sw, comments=self.comments) return objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if type(pyobj) in _stringtypes: print >>sw, '<%s%s href="%s"/>' % (n, attrtext, pyobj) elif kw.get('inline', self.inl... | 1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf/TC.py |
Canonicalize(pyobj, sw, comments=self.comments) | Canonicalize(pyobj, sw, unsuppressedPrefixes=unsuppressedPrefixes, comments=self.comments) | def serialize(self, sw, pyobj, name=None, attrtext='', **kw): if not self.wrapped: Canonicalize(pyobj, sw, comments=self.comments) return objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if type(pyobj) in _stringtypes: print >>sw, '<%s%s href="%s"/>' % (n, attrtext, pyobj) elif kw.get('inline', self.inl... | 1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1460ab4d6d3e9581d168ae904fd5c9a83c05f0cf/TC.py |
mystr = getattr(ex, 'str') or str(ex) mytrace = getattr(ex, 'trace', '') or '' | mystr = getattr(ex, 'str', None) or str(ex) mytrace = getattr(ex, 'trace', '') | def FaultFromZSIException(ex, actor=None): '''Return a Fault object created from a ZSI exception object. ''' mystr = getattr(ex, 'str') or str(ex) mytrace = getattr(ex, 'trace', '') or '' elt = '''<ZSI:ParseFaultDetail> | 99a5883b5427552ff35f257155280d5ad8b73c1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/99a5883b5427552ff35f257155280d5ad8b73c1a/fault.py |
def getTargetNamespace(self): return self._ref.getTargetNamespace() | def getTargetNamespace(self): return self._ref.getTargetNamespace() | 14900417c8fe71d6cae7bdb05efbfbe0fc558a24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/14900417c8fe71d6cae7bdb05efbfbe0fc558a24/wsdlInterface.py | |
%self.__class__.__name__ | % cls.__name__ | def processRequest(cls, ps, **kw): """invokes callback that should return a (request,response) tuple. representing the SOAP request and response respectively. ps -- ParsedSoap instance representing HTTP Body. request -- twisted.web.server.Request """ resource = kw['resource'] request = kw['request'] method = getattr(r... | 76c4093e9231eaeadd12f729147ad99c3c0d1383 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/76c4093e9231eaeadd12f729147ad99c3c0d1383/WSresource.py |
return check | return check_args | def check_args(self, *args, **kw): for i in range(len(args)): if (l > i and interfaces[i].providedBy(args[i])) or type(args[i]) is interfaces[-1]: continue raise TypeError, 'got %s, expecting %s' %(args[i], types[i]) func(self, *args, **kw) | 76c4093e9231eaeadd12f729147ad99c3c0d1383 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/76c4093e9231eaeadd12f729147ad99c3c0d1383/WSresource.py |
sample = typedArrayType(typed=obj._type) | if getattr(obj, "_complexType", None): sample = typedArrayType(typed=obj._type, complexType = obj._complexType) sample._typename = obj._type obj._ns = NS.URN else: sample = typedArrayType(typed=obj._type) | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | 9d0d88122cd5fd6cd29a6e091a60f7c4690b1ce9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/9d0d88122cd5fd6cd29a6e091a60f7c4690b1ce9/SOAPBuilder.py |
type(sample) == DictType: | type(sample) == DictType or \ (isinstance(sample, anyType) and \ (getattr(sample, "_complexType", None) and \ sample._complexType)): | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | 9d0d88122cd5fd6cd29a6e091a60f7c4690b1ce9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/9d0d88122cd5fd6cd29a6e091a60f7c4690b1ce9/SOAPBuilder.py |
sys.path.append('generatedCode') | sys.path.append(subdirPath) | def getModule(self, section, serviceName, subdirPath, schemaOnly=False, explicitPath=None): sys.path.append('generatedCode') try: # fix service = __import__(serviceName + '_services') except ImportError: service = self.generateCode(section, serviceName, subdirPath, schemaOnly, explicitPath) return service | 4f86ae8fc8443cfb477b119044370888fcf79304 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4f86ae8fc8443cfb477b119044370888fcf79304/clientGenerator.py |
if content: return content | if content: return content.getvalue() | def Opaque(self, uri, tc, ps, **keywords): | 73d7599d78ae1e716d9136be0457e309db4045a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/73d7599d78ae1e716d9136be0457e309db4045a4/resolvers.py |
self.ofwhat, self.lenofwhat = tuple(ofwhat), len(ofwhat) | self.ofwhat = tuple(ofwhat) | def __init__(self, pyclass, ofwhat, pname=None, inorder=0, inline=0, | aec049605741d7cc5e4c77c22a19d70b84d73a61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/aec049605741d7cc5e4c77c22a19d70b84d73a61/TCcompound.py |
if count > self.lenofwhat and not self.hasextras: | if count > len(self.ofwhat) and not self.hasextras: | def parse(self, elt, ps): #if elt.localName != self.pname: # elt = elt.getElementsByTagName(self.pname)[0] self.checkname(elt, ps) if self.type and \ self.checktype(elt, ps) not in [ self.type, (None,None) ]: raise EvaluateException('Struct has wrong type', ps.Backtrace(elt)) href = _find_href(elt) if href: if _chil... | aec049605741d7cc5e4c77c22a19d70b84d73a61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/aec049605741d7cc5e4c77c22a19d70b84d73a61/TCcompound.py |
for i,what in [ (i, self.ofwhat[i]) for i in range(self.lenofwhat) ]: | for i,what in [ (i, self.ofwhat[i]) for i in range(len(self.ofwhat)) ]: | def parse(self, elt, ps): #if elt.localName != self.pname: # elt = elt.getElementsByTagName(self.pname)[0] self.checkname(elt, ps) if self.type and \ self.checktype(elt, ps) not in [ self.type, (None,None) ]: raise EvaluateException('Struct has wrong type', ps.Backtrace(elt)) href = _find_href(elt) if href: if _chil... | aec049605741d7cc5e4c77c22a19d70b84d73a61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/aec049605741d7cc5e4c77c22a19d70b84d73a61/TCcompound.py |
'\n%sresponse = self.binding.Receive(%sWrapper)' % \ | '\n%sresponse = self.binding.Receive(%sWrapper())' % \ | '\n%sdef %s(self, request):' % \ | 77307e905cc88f00fb8aa43ce789b1d4e314eba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/77307e905cc88f00fb8aa43ce789b1d4e314eba7/wsdl2python.py |
self.initcode.write('\n%skw["aname"] = "%%s" %% name' \ % ID4) | self.initcode.write('\n%skw["aname"] = "%s" %% name' \ % (ID4, self.aname_func("%s"))) | self.initdef.set('\n%sdef __init__(self, name=None, ns=None, **kw):' % (ID2)) | 77307e905cc88f00fb8aa43ce789b1d4e314eba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/77307e905cc88f00fb8aa43ce789b1d4e314eba7/wsdl2python.py |
self.initcode.write("\n%saname = '%%s' %% name" % ID4) | self.initcode.write("\n%saname = '%s' %% name" % (ID4, self.aname_func("%s"))) | def _complexTypecodeLogic( self, typecodelist, tns ): | 77307e905cc88f00fb8aa43ce789b1d4e314eba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/77307e905cc88f00fb8aa43ce789b1d4e314eba7/wsdl2python.py |
if Config.debug: print "In dump_list.", "obj=", obj | if Config.debug: print "In dump_list.", "obj=", obj | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | e9d40916b217595572c0f900ca840134b91cdc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e9d40916b217595572c0f900ca840134b91cdc9b/SOAPBuilder.py |
id = self.checkref(obj, tag, ns_map) if id == None: return | if typed: id = self.checkref(obj, tag, ns_map) if id == None: return | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | e9d40916b217595572c0f900ca840134b91cdc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e9d40916b217595572c0f900ca840134b91cdc9b/SOAPBuilder.py |
def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | e9d40916b217595572c0f900ca840134b91cdc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e9d40916b217595572c0f900ca840134b91cdc9b/SOAPBuilder.py | ||
self.out.append( '<%s %sarrayType="%s[%d]" %stype="%sArray"%s%s%s%s%s%s>\n' % (tag, ens, t, len(data), ins, ens, ndecl, edecl, idecl, self.genroot(ns_map), id, a)) typed = not same_type try: elemsname = obj._elemsname except: elemsname = "item" | if typed: self.out.append( '<%s %sarrayType="%s[%d]" %stype="%sArray"%s%s%s%s%s%s>\n' % (tag, ens, t, len(data), ins, ens, ndecl, edecl, idecl, self.genroot(ns_map), id, a)) if typed: try: elemsname = obj._elemsname except: elemsname = "item" else: elemsname = tag | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | e9d40916b217595572c0f900ca840134b91cdc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e9d40916b217595572c0f900ca840134b91cdc9b/SOAPBuilder.py |
self.dump(i, elemsname, typed, ns_map) self.out.append('</%s>\n' % tag) | self.dump(i, elemsname, not same_type, ns_map) if typed: self.out.append('</%s>\n' % tag) | def dump_list(self, obj, tag, typed = 1, ns_map = {}): if Config.debug: print "In dump_list.", "obj=", obj tag = tag or self.gentag() tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding | e9d40916b217595572c0f900ca840134b91cdc9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e9d40916b217595572c0f900ca840134b91cdc9b/SOAPBuilder.py |
if host.find(':'): | if host.find(':') >= 0: | def _call(self, name, *args, **kwargs): """Call the named remote web service method.""" if len(args) and len(kwargs): raise TypeError( 'Use positional or keyword argument only.' ) | 486fe47bc26e0f3efad8e85dfefc0cca0345a68d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/486fe47bc26e0f3efad8e85dfefc0cca0345a68d/ServiceProxy.py |
def _call(self, name, *args, **kwargs): """Call the named remote web service method.""" if len(args) and len(kwargs): raise TypeError( 'Use positional or keyword argument only.' ) | 486fe47bc26e0f3efad8e85dfefc0cca0345a68d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/486fe47bc26e0f3efad8e85dfefc0cca0345a68d/ServiceProxy.py | ||
offset = 0, rank = None, asize = 0, elemsname = None): | offset = 0, rank = None, asize = 0, elemsname = None, complexType = 0): | def __init__(self, data = None, name = None, typed = None, attrs = None, offset = 0, rank = None, asize = 0, elemsname = None): | 495884027431de40fa383d3a5c6a5a50e54ec81f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/495884027431de40fa383d3a5c6a5a50e54ec81f/Types.py |
self.args = ("SOAPpy SOAP Exception", code, string, detail) | self.value = ("SOAPpy SOAP Exception", code, string, detail) | def __init__(self, code="", string="", detail=None): self.args = ("SOAPpy SOAP Exception", code, string, detail) self.code = code self.string = string self.detail = detail | 495884027431de40fa383d3a5c6a5a50e54ec81f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/495884027431de40fa383d3a5c6a5a50e54ec81f/Types.py |
se = SOAPException(object.faultcode, object.faultstring, object.detail) raise se | if object.faultstring == "Required Header Misunderstood": raise RequiredHeaderMismatch(object.detail) elif object.faultstring == "Method Not Found": raise MethodNotFound(object.detail) elif object.faultstring == "Authorization Failed": raise AuthorizationFailed(object.detail) elif object.faultstring == "Method Failed":... | def simplify(object, level=0): """ Convert the SOAPpy objects and thier contents to simple python types. This function recursively converts the passed 'container' object, and all public subobjects. (Private subobjects have names that start with '_'.) Conversions: - faultType --> raise python exception - arrayType ... | 495884027431de40fa383d3a5c6a5a50e54ec81f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/495884027431de40fa383d3a5c6a5a50e54ec81f/Types.py |
self.__node = node.documentElement | self.__node = self.__node.documentElement | def loadDocument(self, file): self.__node = DOM.loadDocument(file) if hasattr(self.__node, 'documentElement'): self.__node = node.documentElement | cac560b4ed6df6af0e8e0e253165b16cf82cb1fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/cac560b4ed6df6af0e8e0e253165b16cf82cb1fb/XMLSchema.py |
def check_args(self, *args, **kw): for i in range(len(args)): if (l > i and interfaces[i].providedBy(args[i])) or interfaces[-1].providedBy(args[i]): continue if l > i: raise TypeError, 'arg %s does not implement %s' %(args[i], interfaces[i]) raise TypeError, 'arg %s does not implement %s' %(args[i], interfaces[-1]) fu... | 1a3409b7b54a829b47296eeadd726661a0e52eb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1a3409b7b54a829b47296eeadd726661a0e52eb2/WSresource.py | ||
return str(arg) | s = str(arg) if self.debug: log.msg(s, debug=1) return s | def processResponse(self, arg, **kw): for h in self.handlers: arg = h.processResponse(arg, **kw) return str(arg) | 1a3409b7b54a829b47296eeadd726661a0e52eb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1a3409b7b54a829b47296eeadd726661a0e52eb2/WSresource.py |
"""Returns typecodes representing input and output messages | """Returns typecodes representing input and output messages, if request and/or response fails to be generated return None for either or both. | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
requestTC = self._getTypeCode(parameters=callinfo.getInParameters(), literal=(callinfo.use=='literal')) | try: requestTC = self._getTypeCode(parameters=callinfo.getInParameters(), literal=(callinfo.use=='literal')) except EvaluateException, ex: print "DEBUG: Request Failed to generate --", ex requestTC = None | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
replyTC = self._getTypeCode(parameters=callinfo.getOutParameters(), literal=(callinfo.use=='literal')) | try: replyTC = self._getTypeCode(parameters=callinfo.getOutParameters(), literal=(callinfo.use=='literal')) except EvaluateException, ex: print "DEBUG: Response Failed to generate --", ex replyTC = None | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
request = TC.Struct(pyclass=None, ofwhat=requestTC, pname=callinfo.methodName) response = TC.Struct(pyclass=None, ofwhat=replyTC, pname='%sResponse' %callinfo.methodName) | if requestTC: request = TC.Struct(pyclass=None, ofwhat=requestTC, pname=callinfo.methodName) if replyTC: response = TC.Struct(pyclass=None, ofwhat=replyTC, pname='%sResponse' %callinfo.methodName) | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
request = requestTC[0] response = replyTC[0] | if requestTC: request = requestTC[0] if replyTC: response = replyTC[0] | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
if prefix and callinfo.use == 'encoded': | if request and prefix and callinfo.use == 'encoded': | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(paramete... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
self._wsdl.types[namespaceURI].getTypeDefinition(localName) typeClass = self._getElement() tc = typeClass(name) | tp = self._wsdl.types[namespaceURI].types[localName] tc = self._getType(tp, name, literal, local=True, namespaceURI=namespaceURI) else: tc = typeClass(name) | def _getTypeCode(self, parameters, literal=False): """Returns typecodes representing a parameter set parameters -- list of WSDLTools.ParameterInfo instances representing the parts of a WSDL Message. """ ofwhat = [] for part in parameters: namespaceURI,localName = part.type | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
ofwhat = [] | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py | |
return self._getType(tp, elementName, literal, local, namespaceURI) def _getType(self, tp, name, literal, local, namespaceURI): """Returns a typecode instance representing the passed in type and name. tp -- XMLSchema.TypeDefinition instance name -- element name literal -- literal encoding? local -- is locally defined?... | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py | |
raise EvaluationError, 'only supporting complexType definition' | raise EvaluateException, 'only supporting complexType definition' | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
raise EvaluationError, 'only supporting a model group, no derivations' | raise EvaluateException, 'only supporting a model group, no derivations' | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
tc = TC.Struct(pyclass=None, ofwhat=ofwhat, pname=elementName) | tc = TC.Struct(pyclass=None, ofwhat=ofwhat, pname=name) | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py |
return self.port.getBinding().getPortType().operations.get(self.name) | return self.port.operations.get(self.name) | def getOperation(self): return self.port.getBinding().getPortType().operations.get(self.name) | 86011bd983a67a8292ee80773aa6b8349d13f7d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/86011bd983a67a8292ee80773aa6b8349d13f7d4/containers.py |
return self.port.getBinding().get(self.name) | return self.port.get(self.name) | def getBOperation(self): return self.port.getBinding().get(self.name) | 86011bd983a67a8292ee80773aa6b8349d13f7d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/86011bd983a67a8292ee80773aa6b8349d13f7d4/containers.py |
if typed: | if kw.get('typed', self.typed): | def cb(self, sw, pyobj, name=None, **kw): if not self.mutable and sw.Known(pyobj): return objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if self.inline: print >>sw, '<%s>' % n else: if typed: attrtext = ' xmlns="%s" xsi:type="%s"' % (self.type[0], self.type[1]) else: attrtext = '' print >>sw, '<%s %si... | 98db61d0aa6e567d46e96f31ad3f32ebe835db75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/98db61d0aa6e567d46e96f31ad3f32ebe835db75/TCcompound.py |
_find_default_namespace = lambda E: E.getAttributeNS(None, 'xmlns') | _find_default_namespace = lambda E: E.getAttributeNS(_XMLNS.BASE, None) | def _find_attrNodeNS(E, namespaceURI, localName): '''Must grab the attribute Node to distinquish between an unspecified attribute(None) and one set to empty string(""). namespaceURI localName ''' attr = E.getAttributeNodeNS(namespaceURI, localName) if attr is None: return None try: return attr.value except: pass return... | 48d38fe9a2990ca78723180a7935d90d742d9b95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/48d38fe9a2990ca78723180a7935d90d742d9b95/__init__.py |
resp = buildSOAP(faultType("%s:Client" % NS.ENV_T, "No method %s found" % nsmethod, "%s %s" % tuple(sys.exc_info()[0:2])), encoding = self.server.encoding, config = self.server.config) | info = sys.exc_info() try: resp = buildSOAP(faultType("%s:Client" % NS.ENV_T, "No method %s found" % nsmethod, "%s %s" % tuple(info[0:2])), encoding = self.server.encoding, config = self.server.config) finally: del info | def do_POST(self): global _contexts status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | 793c98daa3d96e516edf70c6ca71abb2202b7eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/793c98daa3d96e516edf70c6ca71abb2202b7eb1/Server.py |
if self.server.config.dumpFaultInfo: s = 'Method %s exception' % nsmethod debugHeader(s) traceback.print_exception(info[0], info[1], info[2]) debugFooter(s) if isinstance(e, faultType): f = e else: f = faultType("%s:Server" % NS.ENV_T, "Method %s failed." % nsmethod) if self.server.config.returnFaultInfo: f._setDetai... | try: if self.server.config.dumpFaultInfo: s = 'Method %s exception' % nsmethod debugHeader(s) traceback.print_exception(info[0], info[1], info[2]) debugFooter(s) if isinstance(e, faultType): f = e else: f = faultType("%s:Server" % NS.ENV_T, "Method %s failed." % nsmethod) if self.server.config.returnFaultInfo: f._set... | def do_POST(self): global _contexts status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | 793c98daa3d96e516edf70c6ca71abb2202b7eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/793c98daa3d96e516edf70c6ca71abb2202b7eb1/Server.py |
elif not hasattr(f, 'detail'): f._setDetail("%s %s" % (info[0], info[1])) | elif not hasattr(f, 'detail'): f._setDetail("%s %s" % (info[0], info[1])) finally: del info | def do_POST(self): global _contexts status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | 793c98daa3d96e516edf70c6ca71abb2202b7eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/793c98daa3d96e516edf70c6ca71abb2202b7eb1/Server.py |
if self.server.config.dumpFaultInfo: s = 'Received fault exception' debugHeader(s) traceback.print_exception(info[0], info[1], info[2]) debugFooter(s) if self.server.config.returnFaultInfo: e._setDetail("".join(traceback.format_exception( info[0], info[1], info[2]))) elif not hasattr(e, 'detail'): e._setDetail("%s %s... | try: if self.server.config.dumpFaultInfo: s = 'Received fault exception' debugHeader(s) traceback.print_exception(info[0], info[1], info[2]) debugFooter(s) if self.server.config.returnFaultInfo: e._setDetail("".join(traceback.format_exception( info[0], info[1], info[2]))) elif not hasattr(e, 'detail'): e._setDetail("%... | def do_POST(self): global _contexts status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | 793c98daa3d96e516edf70c6ca71abb2202b7eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/793c98daa3d96e516edf70c6ca71abb2202b7eb1/Server.py |
traceback.print_exception(info[0], info[1], info[2]) | try: traceback.print_exception(info[0], info[1], info[2]) finally: del info | def do_POST(self): global _contexts status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | 793c98daa3d96e516edf70c6ca71abb2202b7eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/793c98daa3d96e516edf70c6ca71abb2202b7eb1/Server.py |
v[what.aname] = v[what.aname].append(value) | v[what.aname].append(value) | def parse(self, elt, ps): #if elt.localName != self.pname: # elt = elt.getElementsByTagName(self.pname)[0] self.checkname(elt, ps) if self.type and \ self.checktype(elt, ps) not in [ self.type, (None,None) ]: raise EvaluateException('Struct has wrong type', ps.Backtrace(elt)) href = _find_href(elt) if href: if _chil... | 072f70e844216de46af3928641328e0471b1ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/072f70e844216de46af3928641328e0471b1ba91/TCcompound.py |
def hasattr(self, attr): | def hasattr(self, attr, ns=None): | def hasattr(self, attr): """return true if node has attribute attr - attribute to check for """ raise NotImplementedError, 'adapter method not implemented' | 36f34bdb62c4299586877f31abafd4a91e255843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/36f34bdb62c4299586877f31abafd4a91e255843/XMLSchema.py |
attr - attribute to check for | attr -- attribute to check for ns -- namespace of attribute, by default None | def hasattr(self, attr): """return true if node has attribute attr - attribute to check for """ raise NotImplementedError, 'adapter method not implemented' | 36f34bdb62c4299586877f31abafd4a91e255843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/36f34bdb62c4299586877f31abafd4a91e255843/XMLSchema.py |
def hasattr(self, attr): """XXX assuming all xsd attributes not prefixed, all others are. Should ask xmlInterface so it can take care namespace mapping for prefixed attributes | def hasattr(self, attr, ns=None): """attr -- attribute ns -- optional namespace, None means unprefixed attribute. | def hasattr(self, attr): """XXX assuming all xsd attributes not prefixed, all others are. Should ask xmlInterface so it can take care namespace mapping for prefixed attributes """ if not self.__attributes: self.setAttributeDictionary() return self.__attributes.has_key(attr) | 36f34bdb62c4299586877f31abafd4a91e255843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/36f34bdb62c4299586877f31abafd4a91e255843/XMLSchema.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.