rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if markerKey is not None: cmd = cmd + 'and _Marker_key = %s\n' % markerKey | def priority13(): # rat ortholog (symbol) print 'processing priority 13...%s' % mgi_utils.date() cmd = 'select o.*, label = m.symbol, labelTypeName = s.commonName + " ortholog symbol" ' + \ 'from #orthology2 o, MRK_Marker m, MGI_Organism s ' + \ 'where o.m2 = m._Marker_key ' + \ 'and o._OrthologOrganism_key = s._Org... | 5b92781424868aacee0b2bc18b7096aa7848ce8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/342/5b92781424868aacee0b2bc18b7096aa7848ce8e/mrklabel.py | |
cmd = 'select _Marker_key = s._Object_key, st._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ | cmd = 'select distinct _Marker_key = s._Object_key, st._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ | def priority10(): # mouse synonyms (similar, broad, narrow) print 'processing priority 10...%s' % mgi_utils.date() cmd = 'select _Marker_key = s._Object_key, st._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ 'from MGI_SynonymType st, MGI_Synonym s ' + \ 'where st._MGIType_key = 2 ' + \ 'and st.... | f9f9269610fa0cdccc646e11989353975384cf86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/342/f9f9269610fa0cdccc646e11989353975384cf86/mrklabel.py |
cmd = 'select _Marker_key = s._Object_key, s._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ | cmd = 'select _Marker_key = s._Object_key, st._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ | def priority10(): # mouse synonyms (similar, broad, narrow) print 'processing priority 10...%s' % mgi_utils.date() cmd = 'select _Marker_key = s._Object_key, s._Organism_key, _OrthologOrganism_key = NULL, label = s.synonym ' + \ 'from MGI_SynonymType st, MGI_Synonym s ' + \ 'where st._MGIType_key = 2 ' + \ 'and st._... | 062a304fe86b6d31cfa47cfcb61e5b5f6bbbf394 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/342/062a304fe86b6d31cfa47cfcb61e5b5f6bbbf394/mrklabel.py |
for fileName in files: fileList.append(os.path.join(root, fileName)) | for fileName in files: if guess_type(os.path.join(root,fileName))[0] in walFormats: fileList.append(os.path.join(root, fileName)) | def makeWallpapersList(path): """ Do a wallpaper list: from directory, file with list and from image. """ walFormats = ['image/jpeg', 'image/png'] if os.path.isdir(path): fileList = [] for root, dirs, files in os.walk(path): for fileName in files: fileList.append(os.path.join(root, fileName)) return fileList if gues... | 934be28794ddb95acac2ebe522beb064e69828d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/934be28794ddb95acac2ebe522beb064e69828d2/wal.py |
os.system(tool.replace('FILENAME', "'%s'" % options.file.replace("'","\'"))) | os.system(tool.replace('FILENAME', "%s" % config['wallpapers'][config['currentWal']].replace("'","\\'").replace(" ","\\ "))) | def doAction(options, config): """ Do specified in options action and return modified config """ if options.external_tool: tool = options.external_tool else: try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specifie... | 934be28794ddb95acac2ebe522beb064e69828d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/934be28794ddb95acac2ebe522beb064e69828d2/wal.py |
os.system(tool.replace('FILENAME', "'%s'" % config['wallpapers'][config['currentWal']].replace("'","\'"))) | os.system(tool.replace('FILENAME', "%s" % config['wallpapers'][config['currentWal']].replace("'","\\'").replace(" ","\\ "))) | def doAction(options, config): """ Do specified in options action and return modified config """ if options.external_tool: tool = options.external_tool else: try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specifie... | 934be28794ddb95acac2ebe522beb064e69828d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/934be28794ddb95acac2ebe522beb064e69828d2/wal.py |
if not os.path.exists(path): | if not os.path.exists(options.add): | def doAction(options, config): """ Do specified in options action and return modified config """ try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specified tool in database' if options.export: for wal in config['wa... | 6bf8ee2ccedf5825dad552e271b356ef011572f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/6bf8ee2ccedf5825dad552e271b356ef011572f8/wal.py |
fileList = makeWallpapersList(path) | fileList = makeWallpapersList(options.add) | def doAction(options, config): """ Do specified in options action and return modified config """ try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specified tool in database' if options.export: for wal in config['wa... | 6bf8ee2ccedf5825dad552e271b356ef011572f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/6bf8ee2ccedf5825dad552e271b356ef011572f8/wal.py |
'habak -i FILENAME -S', | 'habak -hi FILENAME -mS', | def createConfiguration(): """ Create empty configuration. """ tools = ['hsetroot -fill FILENAME', 'habak -i FILENAME -S', 'Esetroot FILENAME'] try: defTool = [tool.split()[0] for tool in tools if not \ os.system('which %s &>/dev/null' % tool.split()[0])][0] except: raise ParseError, 'Cannot find any usable tool to s... | 4e53f2d0e08a52cb45c9dae546f4f9d79afeeab2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/4e53f2d0e08a52cb45c9dae546f4f9d79afeeab2/wal.py |
os.system(tool.replace('FILENAME', options.file)) | os.system(tool.replace('FILENAME', "'%s'" % options.file.replace("'","\'"))) | def doAction(options, config): """ Do specified in options action and return modified config """ if options.external_tool: tool = options.external_tool else: try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specifie... | 636858367fe8d6f40a8d98c995de34908825cc21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/636858367fe8d6f40a8d98c995de34908825cc21/wal.py |
os.system(tool.replace('FILENAME', config['wallpapers'][config['currentWal']])) | os.system(tool.replace('FILENAME', "'%s'" % config['wallpapers'][config['currentWal']].replace("'","\'"))) | def doAction(options, config): """ Do specified in options action and return modified config """ if options.external_tool: tool = options.external_tool else: try: tool = [tool for tool in config['tools'] if \ tool.split()[0] == (options.tool or config['defaultTool'])][0] except: raise ParseError, 'Cannot find specifie... | 636858367fe8d6f40a8d98c995de34908825cc21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2621/636858367fe8d6f40a8d98c995de34908825cc21/wal.py |
self.NbrJobsSignal = Signal() | def __init__(self): """ """ self.__label = "Un moment..." self.startSignal = Signal() self.refreshSignal = Signal() self.finishSignal = Signal() | 25964136a5299f693dc3b73cf0eaeb4ef7bbff4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/25964136a5299f693dc3b73cf0eaeb4ef7bbff4d/imagizer.py | |
else: if os.path.splitext(File)[1] in config.Extensions: AlsoProcess+=1 | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, max(1,len(List))) | 25964136a5299f693dc3b73cf0eaeb4ef7bbff4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/25964136a5299f693dc3b73cf0eaeb4ef7bbff4d/imagizer.py | |
self.NbrJobsSignal = Signal() | def __init__(self): """ """ self.__label = "Rangement photo" self.startSignal = Signal() self.refreshSignal = Signal() self.finishSignal = Signal() | 25964136a5299f693dc3b73cf0eaeb4ef7bbff4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/25964136a5299f693dc3b73cf0eaeb4ef7bbff4d/imagizer.py | |
if not os.path.isdir(config.SelectedDirectory): mkdir(config.SelectedDirectory) | if not os.path.isdir(SelectedDir): mkdir(SelectedDir) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
for day in os.listdir(config.SelectedDirectory): for File in os.listdir(os.path.join(config.SelectedDirectory,day)): | for day in os.listdir(SelectedDir): for File in os.listdir(os.path.join(SelectedDir,day)): | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
if os.path.isdir(os.path.join(config.SelectedDirectory,day,File)): for ImageFile in os.listdir(os.path.join(config.SelectedDirectory,day,File)): src=os.path.join(config.SelectedDirectory,day,File,ImageFile) dst=os.path.join(config.SelectedDirectory,day,ImageFile) | if os.path.isdir(os.path.join(SelectedDir,day,File)): for ImageFile in os.listdir(os.path.join(SelectedDir,day,File)): src=os.path.join(SelectedDir,day,File,ImageFile) dst=os.path.join(SelectedDir,day,ImageFile) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
dest=os.path.join(config.SelectedDirectory,File) | dest=os.path.join(SelectedDir,File) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
dirs=os.listdir(config.SelectedDirectory) | dirs=os.listdir(SelectedDir) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
pathday=os.path.join(config.SelectedDirectory,day) | pathday=os.path.join(SelectedDir,day) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py | ||
self.pb.set_fraction(float(h+1)/self.__nbVal) | if h<self.__nbVal: self.pb.set_fraction(float(h+1)/self.__nbVal) else: self.pb.set_fraction(1.0) | def updateProgressBar(self,h,filename): """ Mise jour de la progressbar Dans le cas d'un toolkit, c'est ici qu'il faudra appeler le traitement des vnements. set the progress-bar to the given value with the given name @param h: current number of the file @type val: integer or float @param name: name of the current elem... | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py |
print "Gnration des vignettes pour %s "%filename | def ScaleImage(filename): """common processing for one image : create a subfolder "scaled" and "thumb" : """ print "Gnration des vignettes pour %s "%filename config=Config() rootdir=os.path.dirname(filename) scaledir=os.path.join(rootdir,config.ScaledImages["Suffix"]) thumbdir=os.path.join(rootdir,config.Thumbnails["Su... | 00405f0c4fb078d3a39c5486ff5c7f50803c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/00405f0c4fb078d3a39c5486ff5c7f50803c8788/imagizer.py | |
def SplitIntoPages(pathday) | def SplitIntoPages(pathday): | def SplitIntoPages(pathday) """Split a directory (pathday) into pages of 20 images""" files=[] for i in os.listdir(pathday): if os.path.splitext(i)[1] in config.Extensions:files.append(i) files.sort() if len(files)>config.NbrPerPage: pages=1+(len(files)-1)/config.NbrPerPage for i in range(1, pages+1): folder=os.path.... | db1393758c4dbbe81a0f6228d7e6989609521660 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/db1393758c4dbbe81a0f6228d7e6989609521660/imagizer.py |
for filename in daydir | for filename in daydir: | def SplitIntoPages(pathday) """Split a directory (pathday) into pages of 20 images""" files=[] for i in os.listdir(pathday): if os.path.splitext(i)[1] in config.Extensions:files.append(i) files.sort() if len(files)>config.NbrPerPage: pages=1+(len(files)-1)/config.NbrPerPage for i in range(1, pages+1): folder=os.path.... | db1393758c4dbbe81a0f6228d7e6989609521660 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/db1393758c4dbbe81a0f6228d7e6989609521660/imagizer.py |
filename=os.path.join(pathday,PagePrefix+str(i),files[j]) | filename=os.path.join(pathday,config.PagePrefix+str(i),files[j]) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 2885e3143754069a4962263200c072354d29ee7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/2885e3143754069a4962263200c072354d29ee7f/imagizer.py |
x,y=self.taille() return x-y | self.taille() return self.x-self.y | def larg(self): """width-height of a jpeg file""" x,y=self.taille() return x-y | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
return self.x,self.y | def taille(self): """width and height of a jpeg file""" self.LoadPIL() self.x,self.y=self.f.size return self.x,self.y | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py | |
config=Config() Trashdir=os.path.join(config.DefaultRepository,config.TrashDirectory) | Trashdir=os.path.join(self.config.DefaultRepository,self.config.TrashDirectory) | def Trash(self): """Send the file to the trash folder""" config=Config() Trashdir=os.path.join(config.DefaultRepository,config.TrashDirectory) td=os.path.dirname(os.path.join(Trashdir,self.filename)) tf=os.path.join(Trashdir,self.filename) if not os.path.isdir(td): makedir(td) shutil.move(self.fn,os.path.join(Trashdir,... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
x,y=self.taille() data["Resolution"]="%s x %s "%(x,y) | self.taille() data["Resolution"]="%s x %s "%(self.x,self.y) | def exif(self): """return exif data + title from the photo""" clef={ 'Image Make': 'Marque', 'Image Model': 'Modele', 'Image DateTime': 'Heure', 'EXIF Flash':'Flash', 'EXIF FocalLength': 'Focale', 'EXIF FNumber': 'Ouverture', 'EXIF ExposureTime' :'Vitesse', 'EXIF ISOSpeedRatings': 'Iso', 'EXIF ExposureBiasValue': 'Bias... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
self.x,self.y=self.taille() | self.taille() | def show(self,Xsize=600,Ysize=600): """return a pixbuf to shows the image in a Gtk window""" self.x,self.y=self.taille() pixbuf = gtk.gdk.pixbuf_new_from_file(self.fn) if self.x>Xsize: RX=1.0*Xsize/self.x else : RX=1 if self.y>Ysize: RY=1.0*Ysize/self.y else : RY=1 R=min(RY,RX) if R<1: nx=int(R*self.x) ny=int(R*self.y)... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
if self.x>Xsize: RX=1.0*Xsize/self.x else : RX=1 if self.y>Ysize: RY=1.0*Ysize/self.y else : RY=1 R=min(RY,RX) | R=min(float(Xsize)/self.x,float(Ysize)/self.y) | def show(self,Xsize=600,Ysize=600): """return a pixbuf to shows the image in a Gtk window""" self.x,self.y=self.taille() pixbuf = gtk.gdk.pixbuf_new_from_file(self.fn) if self.x>Xsize: RX=1.0*Xsize/self.x else : RX=1 if self.y>Ysize: RY=1.0*Ysize/self.y else : RY=1 R=min(RY,RX) if R<1: nx=int(R*self.x) ny=int(R*self.y)... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
config=Config() | def ContrastMask(self,outfile): """Ceci est un filtre de debouchage de photographies, aussi appel masque de contraste, il permet de rattrapper une photo trop contrast, un contre jour, ... crit par Jrme Kieffer, avec l'aide de la liste python@aful, en particulier A. Fayolles et F. Mantegazza avril 2006 necessite numarra... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py | |
F.save(os.path.join(config.DefaultRepository,outfile),quality=90,progressive=True,Optimize=True) | F.save(os.path.join(self.config.DefaultRepository,outfile),quality=90,progressive=True,Optimize=True) os.chmod(os.path.join(self.config.DefaultRepository,outfile),self.config.DefaultFileMode) | def ContrastMask(self,outfile): """Ceci est un filtre de debouchage de photographies, aussi appel masque de contraste, il permet de rattrapper une photo trop contrast, un contre jour, ... crit par Jrme Kieffer, avec l'aide de la liste python@aful, en particulier A. Fayolles et F. Mantegazza avril 2006 necessite numarra... | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py |
self.startSignal.emit(self.__label, len(List)) | self.startSignal.emit(self.__label, max(1,len(List))) | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 68bab74027a8ab80c2633287327377b36ac0c2d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/68bab74027a8ab80c2633287327377b36ac0c2d4/imagizer.py |
if (os.path.isdir(src)) and (os.path.split(src)[1] in [scaled,thumb]): | if (os.path.isdir(src)) and (os.path.split(src)[1] in [config.ScaledImages["Suffix"],config.Thumbnails["Suffix"]]): | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 68bab74027a8ab80c2633287327377b36ac0c2d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/68bab74027a8ab80c2633287327377b36ac0c2d4/imagizer.py |
class ModelProcessSelected: """Implemantation MVC de la procedure ProcessSelected""" def __init__(self): """ """ self.__label = "Un moment..." self.startSignal = Signal() self.refreshSignal = Signal() self.finishSignal = Signal() def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(L... | see aspn.activestate.com """ def __init__(self, f): self.f = f.im_func self.c = weakref.ref(f.im_self) def __call__(self, *args, **kwargs): if self.c() == None: return self.f(self.c(), *args, **kwargs) | # def start(self): | 02aba0861cad6f07d39c13403ddd4461a7b0bdfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/02aba0861cad6f07d39c13403ddd4461a7b0bdfa/signals.py |
class ModelRangeTout: """Implemantation MVC de la procedure RangeTout moves all the JPEG files to a directory named from their day and with the name according to the time""" def __init__(self): """ """ self.__label = "Rangement photo" self.startSignal = Signal() self.refreshSignal = Signal() self.finishSignal = Signa... | def start(self,List): """ Lance les calculs """ self.startSignal.emit(self.__label, len(List)) | 02aba0861cad6f07d39c13403ddd4461a7b0bdfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/02aba0861cad6f07d39c13403ddd4461a7b0bdfa/signals.py | |
try: | try: | def process_file(file, debug=0): # determine whether it's a JPEG or TIFF data=file.read(4) comment = None is_exif = 0 is_comment = 0 if data[0:4] in ['II*\x00', 'MM\x00*']: # it's a TIFF file file.seek(0) endian=file.read(1) file.read(1) offset=0 elif data[0:2] == '\xFF\xD8': # it's a JPEG file # skip JFIF style header... | 8ddca042d5f5329d79d2cceb1a74d6e86fc01135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/8ddca042d5f5329d79d2cceb1a74d6e86fc01135/EXIF.py |
if comment[-1] == "\x00": | if comment[-1] == "\x00": | def process_file(file, debug=0): # determine whether it's a JPEG or TIFF data=file.read(4) comment = None is_exif = 0 is_comment = 0 if data[0:4] in ['II*\x00', 'MM\x00*']: # it's a TIFF file file.seek(0) endian=file.read(1) file.read(1) offset=0 elif data[0:2] == '\xFF\xD8': # it's a JPEG file # skip JFIF style header... | 8ddca042d5f5329d79d2cceb1a74d6e86fc01135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/8ddca042d5f5329d79d2cceb1a74d6e86fc01135/EXIF.py |
def runcmd(args): | def runcmd(args, mode = Commands): | def runcmd(args): args = [ commands.mkarg(arg) for arg in args ] cmd = " ".join(args) # t = time.time() # print("Executing '%s'." % cmd) (exitstatus, output) = commands.getstatusoutput(cmd) if exitstatus != 0: raise SVKError(cmd, exitstatus >> 8, output) # print("'%s' executed in %s" % (cmd, time.time() - t)) return... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
output = None | def runcmd(args): args = [ commands.mkarg(arg) for arg in args ] cmd = " ".join(args) # t = time.time() # print("Executing '%s'." % cmd) (exitstatus, output) = commands.getstatusoutput(cmd) if exitstatus != 0: raise SVKError(cmd, exitstatus >> 8, output) # print("'%s' executed in %s" % (cmd, time.time() - t)) return... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py | |
(exitstatus, output) = commands.getstatusoutput(cmd) | if mode == Commands: (exitstatus, output) = commands.getstatusoutput(cmd) exitstatus >>= 8 elif mode == System: exitstatus = os.system(cmd) | def runcmd(args): args = [ commands.mkarg(arg) for arg in args ] cmd = " ".join(args) # t = time.time() # print("Executing '%s'." % cmd) (exitstatus, output) = commands.getstatusoutput(cmd) if exitstatus != 0: raise SVKError(cmd, exitstatus >> 8, output) # print("'%s' executed in %s" % (cmd, time.time() - t)) return... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
raise SVKError(cmd, exitstatus >> 8, output) | raise SVKError(cmd, exitstatus, output) | def runcmd(args): args = [ commands.mkarg(arg) for arg in args ] cmd = " ".join(args) # t = time.time() # print("Executing '%s'." % cmd) (exitstatus, output) = commands.getstatusoutput(cmd) if exitstatus != 0: raise SVKError(cmd, exitstatus >> 8, output) # print("'%s' executed in %s" % (cmd, time.time() - t)) return... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
def getexternals(path): svnpath = findsvnpath(finddepotpath(path)) | def findcopypath(path): info = runcmd([Config.svk, 'info', path]) infodict = {} for line in info.splitlines(): (key, value) = line.split(": ") infodict[key] = value return '/'+infodict['Copied From'].split(', ')[0] def getexternals(path, depotpath): if not depotpath: depotpath = finddepotpath(path) svnpath = findsvnpa... | def getexternals(path): svnpath = findsvnpath(finddepotpath(path)) def findexternals(arg, dirname, fnames): import re args = [ Config.svn, 'propget', 'svn:externals', re.sub("^%s" % path, svnpath, dirname) ] try: dirext = runcmd(args) except SVKError: return if dirext == '': return import re for line in re.split('[\n... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
def handleexternals(path, handler): | def handleexternals(path, handler, depotpath): | def handleexternals(path, handler): extcache = [] toclist = gettocfiles(path) for toc in toclist: tocdir = os.path.dirname(toc) extdestdir = os.path.dirname(tocdir) externals = getexternals(path) for ext,upstream in externals: if upstream in extcache: continue mipath = None for url in mi.byvalue.keys(): i = upstream.... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
externals = getexternals(path) | externals = getexternals(tocdir, tocdir.replace(path, depotpath)) if not externals: continue | def handleexternals(path, handler): extcache = [] toclist = gettocfiles(path) for toc in toclist: tocdir = os.path.dirname(toc) extdestdir = os.path.dirname(tocdir) externals = getexternals(path) for ext,upstream in externals: if upstream in extcache: continue mipath = None for url in mi.byvalue.keys(): i = upstream.... | b69610dce38df0eb8e9783001970f9a24f86efec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/b69610dce38df0eb8e9783001970f9a24f86efec/__init__.py |
return getlastpath('Copied From') | return getlastpath(path, 'Copied From') | def findcopypath(path): return getlastpath('Copied From') | 4adb556955982ca2798eb7506b8882a9fba9eff4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/4adb556955982ca2798eb7506b8882a9fba9eff4/__init__.py |
return getlastpath('Merged From') | return getlastpath(path, 'Merged From') | def getlastmergepath(path): return getlastpath('Merged From') | 4adb556955982ca2798eb7506b8882a9fba9eff4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/4adb556955982ca2798eb7506b8882a9fba9eff4/__init__.py |
import types | import types, re | def getsvkinfo(path): if not infos.get(path): import types info = runcmd([Config.svk, 'info', path]) infodict = {} for line in info.splitlines(): fields = line.split(": ") if len(fields) != 2: sys.__stderr__.write("Unexpected number of fields in line `%s', skipping." % line) continue key = fields[1] value = fields[2] ... | 478039ee6e4d1591d905579f9637415a813fa4f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/478039ee6e4d1591d905579f9637415a813fa4f0/__init__.py |
fields = line.split(": ") if len(fields) != 2: sys.__stderr__.write("Unexpected number of fields in line `%s', skipping." % line) continue key = fields[1] value = fields[2] | m = re.match('([^:]+): (.*)$', line) key = m.group(1) value = m.group(2) | def getsvkinfo(path): if not infos.get(path): import types info = runcmd([Config.svk, 'info', path]) infodict = {} for line in info.splitlines(): fields = line.split(": ") if len(fields) != 2: sys.__stderr__.write("Unexpected number of fields in line `%s', skipping." % line) continue key = fields[1] value = fields[2] ... | 478039ee6e4d1591d905579f9637415a813fa4f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12623/478039ee6e4d1591d905579f9637415a813fa4f0/__init__.py |
path = "notes/active/" | def __init__(self): path = "notes/active/" for note in os.listdir(path): if os.path.isfile(os.path.join(path,note)): self.noteList.append(self.loadNote(note)) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py | |
if os.path.isfile(os.path.join(path,note)): self.noteList.append(self.loadNote(note)) | filepath = os.path.join(path,note) if os.path.isfile(filepath): self.loadNote(filepath) | def __init__(self): path = "notes/active/" for note in os.listdir(path): if os.path.isfile(os.path.join(path,note)): self.noteList.append(self.loadNote(note)) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py |
note = cPickle.load(open("notes/active/%s" % file,"rb")) note.text = decompress(note.text) | note = cPickle.load(open(file,"rb")) note.setFilepath(file) note.setText(decompress(note.getText())) if note not in self.noteList: self.noteList.append(note) | def loadNote(self,file): note = cPickle.load(open("notes/active/%s" % file,"rb")) note.text = decompress(note.text) return note | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py |
if note not in self.noteList: self.noteList.append(note) | def saveNote(self,note): if note not in self.noteList: self.noteList.append(note) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py | |
note.text = compress(note.text) | self.removeNote(note) if note.getText() != "": note.setFilepath("") note.setText(compress(note.getText())) | def saveNote(self,note): if note not in self.noteList: self.noteList.append(note) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py |
cFile = StringIO() cPickle.dump(note,cFile,-1) nFile = file("notes/active/%s" % md5.new(cFile.getvalue()).hexdigest(),"wb") nFile.write(cFile.getvalue()) nFile.close() cFile.close() | cFile = StringIO() cPickle.dump(note,cFile,-1) | def saveNote(self,note): if note not in self.noteList: self.noteList.append(note) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py |
note.text = decompress(note.text) | filepath = os.path.join(path,md5.new(cFile.getvalue()).hexdigest()) nFile = file(filepath,"wb") nFile.write(cFile.getvalue()) nFile.close() cFile.close() note = self.loadNote(filepath) | def saveNote(self,note): if note not in self.noteList: self.noteList.append(note) | be5fd71a59f94863e7f54998815958259544afa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/be5fd71a59f94863e7f54998815958259544afa6/notes.py |
note.setText(decompress(note.getText())) | note.setText(unicode(decompress(note.getText()),'utf-8')) | def loadNote(self,file): note = cPickle.load(open(file,"rb")) note.setFilepath(file) note.setText(decompress(note.getText())) | 62a0f24bf5f186dba5f11a3f04a472552e754f85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/62a0f24bf5f186dba5f11a3f04a472552e754f85/notes.py |
note.setText(compress(note.getText())) | note.setText(compress(note.getText().encode('utf-8'))) | def saveNote(self,note): | 62a0f24bf5f186dba5f11a3f04a472552e754f85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2701/62a0f24bf5f186dba5f11a3f04a472552e754f85/notes.py |
os._exit() | os._exit(0) | def run(self, result=None): if result is None: result = self.defaultTestResult() c2pread, c2pwrite = os.pipe() # fixme - error -> result # now fork pid = os.fork() if pid == 0: # Child # Close parent's pipe ends os.close(c2pread) # Dup fds for child os.dup2(c2pwrite, 1) # Close pipe fds. os.close(c2pwrite) | 40dcbc4cd0c3b58aa55f2963ec724ef6da0b23d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6381/40dcbc4cd0c3b58aa55f2963ec724ef6da0b23d7/__init__.py |
self.text.LoadFile(filename) | self.text.SetValue(open(filename).read()) | def Open(self, filename): self.filename = filename self.text.LoadFile(filename) | d93cec7127c59c78f97b7a69324a3494aebc158a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/d93cec7127c59c78f97b7a69324a3494aebc158a/SrcFrame.py |
recent.Append(ID_RECENT_FILES+i, f) | recent.Append(ID_RECENT_FILES+i, os.path.basename(f)) | def InitMenu(self): menu = (('&File', (('&New', wx.ID_NEW, self.OnNew), ('&Open', wx.ID_OPEN, self.OnOpen), ('&Save', wx.ID_SAVE, self.OnSave), ('Save as...', wx.ID_SAVEAS, self.OnSaveAs), None, ('&Close', wx.ID_CLOSE, self.OnClose), ('Close all', wx.ID_CLOSE_ALL, self.OnCloseAll), ('E&xit', wx.ID_EXIT, self.OnExit))),... | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
self.Load(self.recent[evt.GetId()-ID_RECENT_FILES]) | self.Load(self.recent[ID_RECENT_FILES-evt.GetId()-1]) | def OnOpenRecent(self, evt): self.Load(self.recent[evt.GetId()-ID_RECENT_FILES]) | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
if filename in self.recent: self.recent.remove(filename) self.recent.append(filename) | absname = os.path.abspath(filename) if absname in self.recent: self.recent.remove(absname) self.recent.append(absname) | def Load(self, filename): SrcFrame.create(self, filename) if filename in self.recent: self.recent.remove(filename) self.recent.append(filename) | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
pass | sel = self.book.GetSelection() if sel != -1: if self.book.GetPage(sel).text.CanRedo(): self.book.GetPage(sel).text.Redo() else: print 'No Redo available' | def OnRedo(self, evt): pass | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
self.clip = self.book.GetPage(sel).text.Copy(True) | self.clip = self.book.GetPage(sel).text.Cut() | def OnCut(self, evt): sel = self.book.GetSelection() if sel != -1: self.clip = self.book.GetPage(sel).text.Copy(True) | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
self.clip = self.book.GetPage(sel).text.Paste(self.clip) | self.clip = self.book.GetPage(sel).text.Paste() | def OnPaste(self, evt): sel = self.book.GetSelection() if sel != -1: self.clip = self.book.GetPage(sel).text.Paste(self.clip) | 2947bcd65ade14a0876289c7282975361342b4ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/2947bcd65ade14a0876289c7282975361342b4ea/bride.py |
self.book.SetSelection(0) | if self.book.GetPageCount() > 0: self.book.SetSelection(0) | def ClosePage(self, index): if self.book.GetPage(index).text.IsModified(): return False else: success = self.book.DeletePage(index) self.book.SetSelection(0) return success | 8ee76d6f8834f2af273709f4cef45980ca843d04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2678/8ee76d6f8834f2af273709f4cef45980ca843d04/bride.py |
if s.is_dirty(): | if self.__stores[s].is_dirty(): | def is_dirty(self): for s in self.__stores: if s.is_dirty(): return 1 return 0 | bad5efac772c3d22fffaf71b824d2b35987d8441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/bad5efac772c3d22fffaf71b824d2b35987d8441/StoreCollection.py |
self.samenext.is_sensitive(1) | self.sameButton.set_sensitive(1) | def savenext(self, obj): try: self.save(obj) except NotValid: self.error("Data not valid") return UI.save_previous(self, item) self.samenext.is_sensitive(1) self.next(obj) self.saveable(self.stores.is_dirty()) | 1248bfe57af3938cc38cf31510b2f9d3dda3150e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/1248bfe57af3938cc38cf31510b2f9d3dda3150e/GtkInterface.py |
self.next(obj) | self.savenext(obj) | def samenext(self, obj): item = UI.get_previous(self) self.title.entry.set_text(item.get_title(1)) self.__textview_set(self.desc, item.get_description(1)) self.next(obj) | 1248bfe57af3938cc38cf31510b2f9d3dda3150e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/1248bfe57af3938cc38cf31510b2f9d3dda3150e/GtkInterface.py |
print filename print self.__getdirname(filename) | def getstore(self, filename): print filename print self.__getdirname(filename) try: store = self.__stores[self.__getdirname(filename)] except KeyError: self.open(filename) store = self.__stores[self.__getdirname(filename)] return store | 6a87680541b794fa3b6e8d19b64348540f45b64c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/6a87680541b794fa3b6e8d19b64348540f45b64c/StoreCollection.py | |
if node.nodeType == xml.dom.Node.ELEMENT_NODE and node.tagName == "description": | if node.nodeType != xml.dom.Node.ELEMENT_NODE or node.tagName != "description": continue if node.hasChildNodes() and len(node.childNodes) == 1: if xmlutils.hasChildTextNode(node): return node child = node.firstChild if child.nodeType == xml.dom.Node.ELEMENT_NODE and child.tagName == "para" and xmlutils.hasChildTextNode... | def __get_description_element(self): children = self.__node.childNodes for node in children: # Here I assume that description is a text node; I am not sure # it's a good assumption if node.nodeType == xml.dom.Node.ELEMENT_NODE and node.tagName == "description": return node else: return None return None | 383d1ea09131aceeedbf34d4157defbcc5d937fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/383d1ea09131aceeedbf34d4157defbcc5d937fd/Item.py |
else: return None | def __get_description_element(self): children = self.__node.childNodes for node in children: # Here I assume that description is a text node; I am not sure # it's a good assumption if node.nodeType == xml.dom.Node.ELEMENT_NODE and node.tagName == "description": return node else: return None return None | 383d1ea09131aceeedbf34d4157defbcc5d937fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/383d1ea09131aceeedbf34d4157defbcc5d937fd/Item.py | |
if desc_element != None and desc_element.hasChildNodes() and desc_element.firstChild.nodeType == xml.dom.Node.TEXT_NODE: value = desc_element.firstChild.data | if desc_element != None: if desc_element.firstChild.nodeType == xml.dom.Node.ELEMENT_NODE: node = desc_element.firstChild else: node = desc_element value = xmlutils.getChildTextNode(node) | def get_description(self, nonone = 0): desc_element = self.__get_description_element() if desc_element != None and desc_element.hasChildNodes() and desc_element.firstChild.nodeType == xml.dom.Node.TEXT_NODE: value = desc_element.firstChild.data else: value = None if nonone and value == None: value = "" return value | 383d1ea09131aceeedbf34d4157defbcc5d937fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/383d1ea09131aceeedbf34d4157defbcc5d937fd/Item.py |
item.set_description(self.desc.get_buffer().get_text()) | item.set_description(self.desc.get_buffer().get_text( self.desc.get_buffer().get_start_iter(), self.desc.get_buffer().get_end_iter())) | def save(self, obj): item = self.stores.get_item(self.filename, self) item.set_title(self.title.entry.get_text()) self.__combo_add_entry(self.title, self.title.entry.get_text()) item.set_description(self.desc.get_buffer().get_text()) | e080634355f4893d132dbb1abb3edf802ca7db70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3011/e080634355f4893d132dbb1abb3edf802ca7db70/GtkInterface.py |
parser = OptionParser ("usage: %prog [optoins] name") | parser = OptionParser ("usage: %prog [options] name") | def parse_args (): from optparse import OptionParser parser = OptionParser ("usage: %prog [optoins] name") parser.add_option ("-A", "--ACE", dest="project", action="store_const", help="Branch/tag only ACE", default=None, const="ace") parser.add_option ("-T", "--TAO", dest="project", action="store_const", help="Branch/... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py |
parser.add_option ("-t", "--tag", dest="action", | parser.add_option ("-t", "--tag", dest="action", | def parse_args (): from optparse import OptionParser parser = OptionParser ("usage: %prog [optoins] name") parser.add_option ("-A", "--ACE", dest="project", action="store_const", help="Branch/tag only ACE", default=None, const="ace") parser.add_option ("-T", "--TAO", dest="project", action="store_const", help="Branch/... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py |
parser.add_option ("-r", "--repo", dest="repo", | parser.add_option ("-r", "--repo", dest="repo", | def parse_args (): from optparse import OptionParser parser = OptionParser ("usage: %prog [optoins] name") parser.add_option ("-A", "--ACE", dest="project", action="store_const", help="Branch/tag only ACE", default=None, const="ace") parser.add_option ("-T", "--TAO", dest="project", action="store_const", help="Branch/... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py |
def parse_args (): from optparse import OptionParser parser = OptionParser ("usage: %prog [optoins] name") parser.add_option ("-A", "--ACE", dest="project", action="store_const", help="Branch/tag only ACE", default=None, const="ace") parser.add_option ("-T", "--TAO", dest="project", action="store_const", help="Branch/... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py | ||
def branch_TAO (): branch_ACE () # Perform branching destination = opts.repo + opts.dest svn_copy (opts.repo + opts.source + "/TAO", destination + "modules/TAO") #Create the set svn_mkdir_local ("sets/ACE+TAO") svn_propset ("sets/ACE+TAO", "svn:externals", "%s\t%s\n%s\t%s" % ("ACE_wrappers", destination + "modules/AC... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py | ||
destination + "modules/CIAO")) | destination + "modules/CIAO")) | def branch_CIAO (): branch_TAO () #Perform branching destination = opts.repo + opts.dest svn_copy (opts.repo + opts.source + "/CIAO", destination + "modules/CIAO") # Create the set svn_mkdir_local ("sets/ACE+TAO+CIAO") svn_propset ("sets/ACE+TAO+CIAO", "svn:externals", "%s\t%s\n%s\t%s\n%s\t%s" % ("ACE_wrappers", dest... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py |
def main (opts, args): # Lets make opts global globals ()['opts'] = opts path = str () if opts.action: # True for tag path = "tags/" else: # Branch path = "branches/" path += "%s/%s" % (opts.dest, args[0]) # Make branch/tag directory svn_mkdir (opts.repo + path) # Make modules and sets subdirectory svn_mkdir (opts.r... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py | ||
def main (opts, args): # Lets make opts global globals ()['opts'] = opts path = str () if opts.action: # True for tag path = "tags/" else: # Branch path = "branches/" path += "%s/%s" % (opts.dest, args[0]) # Make branch/tag directory svn_mkdir (opts.repo + path) # Make modules and sets subdirectory svn_mkdir (opts.r... | 008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5660/008f3d68a8f4b0ff9dc390e6ab79cedebd1a1902/sets-manager.py | ||
o = super(MyCopyClass, self).copyWithZone_(zone) | o = self.__class__.alloc().init() | def copyWithZone_(self, zone): o = super(MyCopyClass, self).copyWithZone_(zone) o.foobar = 2 return o | cc5106d689b00abb1ddd92a24bac3efed4820e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cc5106d689b00abb1ddd92a24bac3efed4820e59/test_subclass.py |
def copyWithZone_(self, zone): o = super(MyCopyClass, self).copyWithZone_(zone) o.foobar = 2 return o | cc5106d689b00abb1ddd92a24bac3efed4820e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/cc5106d689b00abb1ddd92a24bac3efed4820e59/test_subclass.py | ||
rt.NSBundle.bundleWithPath_( '/System/Library/Frameworks/AppKit.framework').load() | rt.NSBundle.bundleWithPath_('/System/Library/Frameworks/AppKit.framework').load() | def main(): pool = rt.NSAutoreleasePool() # Load Application Framework: rt.NSBundle.bundleWithPath_( '/System/Library/Frameworks/AppKit.framework').load() NSApp = rt.NSApplication.sharedApplication() win = rt.NSWindow.alloc() frame = ((200.0, 300.0), (250.0, 100.0)) win.initWithContentRect_styleMask_backing_defer_ ... | bfc21dbdbfe71c52cb450ccf5573e49738f63807 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/bfc21dbdbfe71c52cb450ccf5573e49738f63807/HelloWorld.py |
NSApp = rt.NSApplication.sharedApplication() | def main(): pool = rt.NSAutoreleasePool() # Load Application Framework: rt.NSBundle.bundleWithPath_( '/System/Library/Frameworks/AppKit.framework').load() NSApp = rt.NSApplication.sharedApplication() win = rt.NSWindow.alloc() frame = ((200.0, 300.0), (250.0, 100.0)) win.initWithContentRect_styleMask_backing_defer_ ... | bfc21dbdbfe71c52cb450ccf5573e49738f63807 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/bfc21dbdbfe71c52cb450ccf5573e49738f63807/HelloWorld.py | |
return +number_wrap(_num_to_python(numA)) | return number_wrap(+_num_to_python(numA)) | def __pos__CFNumber(numA): return +number_wrap(_num_to_python(numA)) | 5e84edd0b375bbc59fcd841bb442e75787486ba6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/5e84edd0b375bbc59fcd841bb442e75787486ba6/_convenience.py |
Thread.__init__(target=self.doWork) | Thread.__init__(self) | def __init__(self): """Create a worker thread. Start it by calling the start() method.""" self.queue = Queue() Thread.__init__(target=self.doWork) | c851354cec54ab85417ead275c27995a38df9c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c851354cec54ab85417ead275c27995a38df9c91/WSTConnectionWindowControllerClass.py |
self.setStatusTextFieldMessage_(None) self.methodDescriptionTextView.setString_(methodDescription) | if selectedRow == self.methodsTable.selectedRow(): self.setStatusTextFieldMessage_(None) self.methodDescriptionTextView.setString_(methodDescription) | def work(): self.setStatusTextFieldMessage_("Retrieving signature for method %s..." % selectedMethod) methodDescription = getattr(self._server, self._methodPrefix + "methodHelp")(selectedMethod) if not methodDescription: methodDescription = "No description available." self._methodDescriptions[selectedMethod] = methodDe... | c851354cec54ab85417ead275c27995a38df9c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c851354cec54ab85417ead275c27995a38df9c91/WSTConnectionWindowControllerClass.py |
methodDescription = self._methodDescriptions[selectedMethod] | def work(): self.setStatusTextFieldMessage_("Retrieving signature for method %s..." % selectedMethod) methodDescription = getattr(self._server, self._methodPrefix + "methodHelp")(selectedMethod) if not methodDescription: methodDescription = "No description available." self._methodDescriptions[selectedMethod] = methodDe... | c851354cec54ab85417ead275c27995a38df9c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c851354cec54ab85417ead275c27995a38df9c91/WSTConnectionWindowControllerClass.py | |
self.methodDescriptionTextView.setString_(methodDescription) | methodDescription = self._methodDescriptions[selectedMethod] self.methodDescriptionTextView.setString_(methodDescription) | def work(): self.setStatusTextFieldMessage_("Retrieving signature for method %s..." % selectedMethod) methodDescription = getattr(self._server, self._methodPrefix + "methodHelp")(selectedMethod) if not methodDescription: methodDescription = "No description available." self._methodDescriptions[selectedMethod] = methodDe... | c851354cec54ab85417ead275c27995a38df9c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c851354cec54ab85417ead275c27995a38df9c91/WSTConnectionWindowControllerClass.py |
OSX_VERSION = LooseVersion(os.popen('/usr/bin/sw_vers -productVersion').read().strip()) | OSX_VERSION = LooseVersion(tools.sw_vers()) | def write_preflight_rm(path, files): fobj = file(path, 'w') fobj.write(PREFLIGHT_RM % dict(files=map(os.path.normpath, files))) fobj.close() os.chmod(path, 0775) | e07b080082f4dbf5048e912e86058ebb3ea36057 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/e07b080082f4dbf5048e912e86058ebb3ea36057/pyobjc_mpkg.py |
for base in cls.__bases__: if hasattr(base, "_getDefaults"): defaults.update(base._getDefaults()) | def _getDefaults(cls): defaults = {} for name, value in cls.__dict__.items(): if name[0] != "_" and not isinstance(value, (function, classmethod)): defaults[name] = deepcopy(value) for base in cls.__bases__: if hasattr(base, "_getDefaults"): defaults.update(base._getDefaults()) return defaults | 9e74465ef8769cd60189563e76048b0b27365c67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9e74465ef8769cd60189563e76048b0b27365c67/bundlebuilder.py | |
if not hasattr(plist, "CFBundleIdentifier"): | if self.bundle_id: plist.CFBundleIdentifier = self.bundle_id elif not hasattr(plist, "CFBundleIdentifier"): | def setup(self): # XXX rethink self.name munging, this is brittle. self.name, ext = os.path.splitext(self.name) if not ext: ext = ".bundle" bundleextension = ext # misc (derived) attributes self.bundlepath = pathjoin(self.builddir, self.name + bundleextension) | 9e74465ef8769cd60189563e76048b0b27365c67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9e74465ef8769cd60189563e76048b0b27365c67/bundlebuilder.py |
os.environ["PYTHONPATH"] = resdir if %(standalone)s: os.environ["PYTHONHOME"] = resdir | if %(standalone)s or %(semi_standalone)s: os.environ["PYTHONPATH"] = resdir if %(standalone)s: os.environ["PYTHONHOME"] = resdir else: pypath = os.getenv("PYTHONPATH", "") if pypath: pypath = ":" + pypath os.environ["PYTHONPATH"] = resdir + pypath | def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) | 9e74465ef8769cd60189563e76048b0b27365c67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9e74465ef8769cd60189563e76048b0b27365c67/bundlebuilder.py |
self.executable = sys.executable | if self.python: self.executable = self.python else: self.executable = sys.executable | def setup(self): if ((self.standalone or self.semi_standalone) and self.mainprogram is None): raise BundleBuilderError, ("must specify 'mainprogram' when " "building a standalone application.") if self.mainprogram is None and self.executable is None: raise BundleBuilderError, ("must specify either or both of " "'execut... | 9e74465ef8769cd60189563e76048b0b27365c67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9e74465ef8769cd60189563e76048b0b27365c67/bundlebuilder.py |
"lib=", "python=", "semi-standalone") | "lib=", "python=", "semi-standalone", "bundle-id=") | def main(builder=None): if builder is None: builder = AppBuilder(verbosity=1) shortopts = "b:n:r:f:e:m:c:p:lx:i:hvqa" longopts = ("builddir=", "name=", "resource=", "file=", "executable=", "mainprogram=", "creator=", "nib=", "plist=", "link", "link-exec", "help", "verbose", "quiet", "argv", "standalone", "exclude=", "... | 9e74465ef8769cd60189563e76048b0b27365c67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/9e74465ef8769cd60189563e76048b0b27365c67/bundlebuilder.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.