rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
repository.init_from_path(os.path.join(self.config.get("local_repo_root_dir"),repoPath)) | repository.init_from_path(os.path.join(config.get("local_repo_root_dir"),repoPath)) | def _get_distant_exercise_repository_list(self): """Build and return a list of distant and offline repositories. There is one repository initialized for each url found in the config files. If the url is reachable, a distant repository is initialized, else an offline repository is created. """ #Get the list of files con... | 0398e3fa04bde3c724898351f2365e14d45ee6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0398e3fa04bde3c724898351f2365e14d45ee6c5/exercise_repository_manager.py |
repoPathList = os.listdir(self.config.get("local_repo_root_dir")) | repoPathList = os.listdir(config.get("local_repo_root_dir")) | def _get_orphan_exercise_repository_list(self,repositoryListIn): repoPathList = os.listdir(self.config.get("local_repo_root_dir")) repoUsedPath = [] repositoryList = [] for repo in repositoryListIn: repoUsedPath.append(repo.get_local_path()) | 0398e3fa04bde3c724898351f2365e14d45ee6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0398e3fa04bde3c724898351f2365e14d45ee6c5/exercise_repository_manager.py |
path = os.path.join(self.config.get("local_repo_root_dir"), repoPath) | path = os.path.join(config.get("local_repo_root_dir"), repoPath) | def _get_orphan_exercise_repository_list(self,repositoryListIn): repoPathList = os.listdir(self.config.get("local_repo_root_dir")) repoUsedPath = [] repositoryList = [] for repo in repositoryListIn: repoUsedPath.append(repo.get_local_path()) | 0398e3fa04bde3c724898351f2365e14d45ee6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0398e3fa04bde3c724898351f2365e14d45ee6c5/exercise_repository_manager.py |
localRepoPath = os.path.join(self.config.get("local_repo_root_dir"),"local") | localRepoPath = os.path.join(config.get("local_repo_root_dir"),"local") | def import_package(self, import_path): | 0398e3fa04bde3c724898351f2365e14d45ee6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0398e3fa04bde3c724898351f2365e14d45ee6c5/exercise_repository_manager.py |
def Load(self, text): self.symbolList = [] self.wordList = [] self.workList = [] self.workValidityList = [] textToParse = text self.activeWordIndex = 0 self.activeWordPos = 0 self.helpChar = '~' while len(textToParse) > 0: if re.match('^([0-9\'a-zA-Z]+)[^0-9\'a-zA-Z]', textToParse): m = re.search('^([0-9\'a-zA-Z]+)[^0-... | d9107fd00201753923466ad5c9b225ea859b2d8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/d9107fd00201753923466ad5c9b225ea859b2d8a/sequence.py | ||
lang = os.path.basename(os.path.dirname(mo)) | lang = os.path.basename(os.path.dirname(os.path.dirname(mo))) | def _find_mo_files (self): data_files = [] | d4e8f819ca689fc1459d03e1d21ff8627e675f6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/d4e8f819ca689fc1459d03e1d21ff8627e675f6f/setup.py |
if self.workValidityList[self.activeWordIndex] < 0: | if not startWith(self.wordList[self.activeWordIndex], self.workList[self.activeWordIndex]): | def WorkChange(self): """Update the validity of the current word""" self.ComputeValidity(self.activeWordIndex) | e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1/sequence.py |
"""Compute a score between 1 and 0 and -1 (or less) 0 if the word is empty 1 if the word is completed negative if the user type a lot of mistake 20% of the score is given by the lenght and 80% by the good letters""" | def ComputeValidity(self, index): # Compute a score between 1 and 0 and -1 (or less) # 0 if the word is empty # 1 if the word is completed # negative if the user type a lot of mistake # 20% of the score is given by the lenght and 80% by the good letters | e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1/sequence.py | |
"""Check if the word is correct but at the wrong place.""" | def CheckLocation(self, index): # Check if the word is correct but at the wrong place. for i in range(1,4): if index+i < len(self.wordList) and self.GetValidity(index+i) != 1 and self.workList[index].lower() == self.wordList[index+i].lower(): return index + i if index-i >= 0 and self.GetValidity(index-i) != 1 and self.... | e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/e7d5d8b8e61acaab36ea8a32aa2fdfd65846b2f1/sequence.py | |
print "set_lock_correction " print new_password | def set_lock_correction(self, state, new_password = None): self.lock_correction = state print "set_lock_correction " print new_password if new_password is not None: salt = "" pop = string.hexdigits while len(salt) < 6: salt += random.choice(pop) | 38fb1fdf1069268ef3fe787f494f532435969ef9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/38fb1fdf1069268ef3fe787f494f532435969ef9/exercise.py | |
path = modele.get(iter, 0)[0] self.controller.notify_load_path(path) | if iter is not None: path = modele.get(iter, 0)[0] self.controller.notify_load_path(path) | def on_lastopenfilesTreeView_cursor_changed(self, widget, data=None): gtkTree = self.builder.get_object("lastopenfilesTreeView") gtkSelection = gtkTree.get_selection() (modele, iter) = gtkSelection.get_selected() path = modele.get(iter, 0)[0] self.controller.notify_load_path(path) | a715e76af42501f7f080d0bdbfd3070911a6586c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/a715e76af42501f7f080d0bdbfd3070911a6586c/gui.py |
"Load the config file and add it to configParser" | """Load the config files and add it to configParser All modifiable options must be on data/config""" | def _loadConfigFiles(self): "Load the config file and add it to configParser" self._localConfFilHref = os.path.join( self.Get("localConfigDir"), "config") self._globalConfFilHref = os.path.join( self.Get("globalConfigDir"), "config") | cd52747207847a0bcdee297f8d3b74c1e9f7a944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/cd52747207847a0bcdee297f8d3b74c1e9f7a944/config.py |
if len( configParser.read(self._globalConfFilHref)) == 0: print "Error : gui file "+self._globalConfFilHref+" not found" | if os.path.isfile(self._globalConfFilHref): configParser.read(self._globalConfFilHref) elif os.path.isfile(os.path.join(self.Get("script"), '/data/config')): configParser.read("../data/config") else: print "Error : global conf file 'config' not found" | def _loadConfigFiles(self): "Load the config file and add it to configParser" self._localConfFilHref = os.path.join( self.Get("localConfigDir"), "config") self._globalConfFilHref = os.path.join( self.Get("globalConfigDir"), "config") | cd52747207847a0bcdee297f8d3b74c1e9f7a944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/cd52747207847a0bcdee297f8d3b74c1e9f7a944/config.py |
"lastOpenFile" = None | "lastOpenFile" : None | def __new__(cls): if cls._instance is None: cls._instance = object.__new__(cls) cls._instance.init() return cls._instance | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py |
def init(self): self.properties = {} self.properties["version"] = APP_VERSION self.properties["app_name"] = APP_NAME self.properties["gettext_package"] = "perroquet" self.properties["executable"] = os.path.dirname(sys.executable) self.properties["script"] = sys.path[0] self.properties["config_dir"] = os.path.join( os.p... | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py | ||
def _load_Files(self): href = os.path.join( self.Get("config_dir", "config") | self.configParser = self._load_Files("files") def _load_Files(self, section): "Load the config file and add it to configParser" href = os.path.join( self.Get("config_dir"), "config") | def _load_Files(self): href = os.path.join( self.Get("config_dir", "config") self.configParser = ConfigParser.ConfigParser() if len( self.configParser.read(href)) == 0: print "No conf file find" for (key, values) in defaultConf.items("): if not key in self.configParser.options(): self.configParser.set("default", key, ... | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py |
self.configParser = ConfigParser.ConfigParser() if len( self.configParser.read(href)) == 0: | configParser = ConfigParser.ConfigParser() if len( configParser.read(href)) == 0: | def _load_Files(self): href = os.path.join( self.Get("config_dir", "config") self.configParser = ConfigParser.ConfigParser() if len( self.configParser.read(href)) == 0: print "No conf file find" for (key, values) in defaultConf.items("): if not key in self.configParser.options(): self.configParser.set("default", key, ... | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py |
for (key, values) in defaultConf.items("): if not key in self.configParser.options(): self.configParser.set("default", key, value) | if not configParser.has_section(section): configParser.add_section(section) for (key, value) in self.__class__.defaultConf.items(): if not key in configParser.options(section): configParser.set(section, key, value) return configParser | def _load_Files(self): href = os.path.join( self.Get("config_dir", "config") self.configParser = ConfigParser.ConfigParser() if len( self.configParser.read(href)) == 0: print "No conf file find" for (key, values) in defaultConf.items("): if not key in self.configParser.options(): self.configParser.set("default", key, ... | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py |
def Get(self, key): | 7b19abf7d5a6a776a423f65290cc0d136b8b699d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7b19abf7d5a6a776a423f65290cc0d136b8b699d/config.py | ||
self.builder.get_object("vbox2").show() | self.builder.get_object("lateralPanel").show() | def set_visible_lateral_panel(self, state): if state: self.builder.get_object("vbox2").show() else: self.builder.get_object("vbox2").hide() | 33bbbf08dfbff9aa51d1033773995a75d699d107 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/33bbbf08dfbff9aa51d1033773995a75d699d107/gui.py |
self.builder.get_object("vbox2").hide() | self.builder.get_object("lateralPanel").hide() | def set_visible_lateral_panel(self, state): if state: self.builder.get_object("vbox2").show() else: self.builder.get_object("vbox2").hide() | 33bbbf08dfbff9aa51d1033773995a75d699d107 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/33bbbf08dfbff9aa51d1033773995a75d699d107/gui.py |
print "plip" | def on_checkmenuitem_correction_toggled(self, widget, data=None): print "plip" toolbutton_show_correction = self.builder.get_object("toolbutton_show_correction") self.controller.notify_toogle_correction(toolbutton_show_correction.props.active) | 0948e099a01936038473300271d5caa7bc50337b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0948e099a01936038473300271d5caa7bc50337b/gui.py | |
print "plop" | def on_toolbutton_show_correction_toggled(self, widget, data=None): print "plop" toolbutton_show_correction = self.builder.get_object("toolbutton_show_correction") self.controller.notify_toogle_correction(toolbutton_show_correction.props.active) | 0948e099a01936038473300271d5caa7bc50337b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0948e099a01936038473300271d5caa7bc50337b/gui.py | |
self.builder.get_object("toolbuttonPlay").shide() | self.builder.get_object("toolbuttonPlay").hide() | def set_visible_play(self, state): if state: self.builder.get_object("toolbuttonPlay").show() else: self.builder.get_object("toolbuttonPlay").shide() | 407af912833e42da69c5776ba2b1b27471118eaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/407af912833e42da69c5776ba2b1b27471118eaf/gui.py |
self.builder.get_object("toolbuttonPause").shide() | self.builder.get_object("toolbuttonPause").hide() | def set_visible_pause(self, state): if state: self.builder.get_object("toolbuttonPause").show() else: self.builder.get_object("toolbuttonPause").shide() | 407af912833e42da69c5776ba2b1b27471118eaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/407af912833e42da69c5776ba2b1b27471118eaf/gui.py |
self.gui.logger.debug("visible="+visible+" , correction_visible="+self.correction_visible) | self.gui.logger.debug("visible="+str(visible)+" , correction_visible="+str(self.correction_visible)) | def notify_toogle_correction(self,visible): self.gui.logger.debug("notify_toogle_correction") self.gui.logger.debug("visible="+visible+" , correction_visible="+self.correction_visible) if visible != self.correction_visible: self.toggle_correction() | 1451429266615c198bcf32ecc9e9247df989a734 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/1451429266615c198bcf32ecc9e9247df989a734/gui_controller.py |
('share/perroquet/', ['data/languages_aliases.ini']), | def _find_mo_files (self): data_files = [] | 1c40abb2cc6c0e81ddd2471f6d0fdc0e11f1bdb9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/1c40abb2cc6c0e81ddd2471f6d0fdc0e11f1bdb9/setup.py | |
if self.outputSavePath == "": self.outputSavePath = self.gui.AskSavePath() if self.outputSavePath == "": | if saveAs or self.outputSavePath == "": outputSavePath = self.gui.AskSavePath() if outputSavePath == None: | def Save(self, saveAs = False): | b0f76d6cc53a49cf1edd98d08659d2b45278a1e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b0f76d6cc53a49cf1edd98d08659d2b45278a1e0/core.py |
elif saveAs: tempPath = self.gui.AskSavePath() if tempPath == "": return self.outputSavePath = tempPath | self.outputSavePath = outputSavePath | def Save(self, saveAs = False): | b0f76d6cc53a49cf1edd98d08659d2b45278a1e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b0f76d6cc53a49cf1edd98d08659d2b45278a1e0/core.py |
('etc/perroquet/', ['data/config.ini']), ('etc/perroquet/', ['data/languages_aliases.ini']), ('etc/perroquet/', ['data/sources.conf']), | ('/etc/perroquet/', ['data/config.ini']), ('/etc/perroquet/', ['data/languages_aliases.ini']), ('/etc/perroquet/', ['data/sources.conf']), | def _find_mo_files (self): data_files = [] | af6bfd1c7363dcb44766deba20eb114fcc848148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/af6bfd1c7363dcb44766deba20eb114fcc848148/setup.py |
self._Load("","","") self.pathListStore = gtk.ListStore(str,str,str,str) | self._Load("", "", "") self.pathListStore = gtk.ListStore(str, str, str, str) | def load(self): | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
self.liststoreLanguage = gtk.ListStore(str,str) | self.liststoreLanguage = gtk.ListStore(str, str) | def load(self): | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
languagesList =languageManager.get_languages_list() | languagesList = languageManager.get_languages_list() | def load(self): | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
(langId,langName,chars) = language iter = self.liststoreLanguage.append([langName,langId]) | (langId, langName, chars) = language iter = self.liststoreLanguage.append([langName, langId]) | def load(self): | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_treeview_paths_list_cursor_changed(self,widget,data=None): (modele, iter) = self.treeviewSelectionPathsList.get_selected() | def on_treeview_paths_list_cursor_changed(self, widget, data=None): (modele, iter) = self.treeviewSelectionPathsList.get_selected() | def on_treeview_paths_list_cursor_changed(self,widget,data=None): (modele, iter) = self.treeviewSelectionPathsList.get_selected() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
self.__load_path(videoPath,exercisePath,translationPath) | self.__load_path(videoPath, exercisePath, translationPath) | def on_treeview_paths_list_cursor_changed(self,widget,data=None): (modele, iter) = self.treeviewSelectionPathsList.get_selected() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
if self.previous_iter(self.pathListStore,self.iterPath) == None: | if self.previous_iter(self.pathListStore, self.iterPath) == None: | def _update_path_buttons(self): if self.iterPath == None: buttonRemovePath = self.builder.get_object("buttonRemovePath") buttonRemovePath.set_sensitive(False) buttonUpPath = self.builder.get_object("buttonUpPath") buttonUpPath.set_sensitive(False) buttonDownPath = self.builder.get_object("buttonDownPath") buttonDownPat... | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): | def on_button_exercise_prop_ok_clicked(self, widget, data=None): | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
langId = self.liststoreLanguage.get_value(iter,1) | langId = self.liststoreLanguage.get_value(iter, 1) | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
lock_properties_password = entry_lock_properties.get_text() | lock_properties_password = entry_lock_properties.get_text() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
lock_correction_password = entry_lock_correction.get_text() | lock_correction_password = entry_lock_correction.get_text() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
for i,subPath in enumerate(self.pathListStore): | for i, subPath in enumerate(self.pathListStore): | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_exercise_prop_cancel_clicked(self,widget,data=None): | def on_button_exercise_prop_cancel_clicked(self, widget, data=None): | def on_button_exercise_prop_cancel_clicked(self,widget,data=None): self.dialog.response(gtk.RESPONSE_CANCEL) | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
self.pathListStore.set_value(self.iterPath,0, os.path.basename(videoPath)) self.pathListStore.set_value(self.iterPath,1, videoPath) self.pathListStore.set_value(self.iterPath,2, exercisePath) self.pathListStore.set_value(self.iterPath,3, translationPath) def on_filechooserbutton_video_prop_file_set(self,widget,data=No... | self.pathListStore.set_value(self.iterPath, 0, os.path.basename(videoPath)) self.pathListStore.set_value(self.iterPath, 1, videoPath) self.pathListStore.set_value(self.iterPath, 2, exercisePath) self.pathListStore.set_value(self.iterPath, 3, translationPath) def on_filechooserbutton_video_prop_file_set(self, widget, d... | def __store_path_changes(self): | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_down_path_clicked(self,widget,data=None): | def on_button_down_path_clicked(self, widget, data=None): | def on_button_down_path_clicked(self,widget,data=None): self.pathListStore.move_after(self.iterPath, self.pathListStore.iter_next(self.iterPath)) self._update_path_buttons() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_up_path_clicked(self,widget,data=None): | def on_button_up_path_clicked(self, widget, data=None): | def on_button_up_path_clicked(self,widget,data=None): self.pathListStore.move_before(self.iterPath, self.previous_iter(self.pathListStore, self.iterPath)) self._update_path_buttons() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_add_path_clicked(self,widget,data=None): | def on_button_add_path_clicked(self, widget, data=None): | def on_button_add_path_clicked(self,widget,data=None): self.__store_path_changes() iter = self.pathListStore.insert_after(self.iterPath, [self.pathListStore.get_value(self.iterPath,0), self.pathListStore.get_value(self.iterPath,1), self.pathListStore.get_value(self.iterPath,2), self.pathListStore.get_value(self.iterPat... | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
iter = self.pathListStore.insert_after(self.iterPath, [self.pathListStore.get_value(self.iterPath,0), self.pathListStore.get_value(self.iterPath,1), self.pathListStore.get_value(self.iterPath,2), self.pathListStore.get_value(self.iterPath,3) ]) | if self.iterPath is None: self.iterPath = self.pathListStore.get_iter_first() while self.pathListStore.iter_next(self.iterPath) is not None: self.iterPath = self.pathListStore.iter_next(self.iterPath) iter = self.pathListStore.insert_after(self.iterPath, [self.pathListStore.get_value(self.iterPath, 0), self.pathListSt... | def on_button_add_path_clicked(self,widget,data=None): self.__store_path_changes() iter = self.pathListStore.insert_after(self.iterPath, [self.pathListStore.get_value(self.iterPath,0), self.pathListStore.get_value(self.iterPath,1), self.pathListStore.get_value(self.iterPath,2), self.pathListStore.get_value(self.iterPat... | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_remove_path_clicked(self,widget,data=None): | def on_button_remove_path_clicked(self, widget, data=None): | def on_button_remove_path_clicked(self,widget,data=None): self.pathListStore.remove(self.iterPath) self.iterPath = None self._update_path_buttons() | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_defaut_time_between_sequences_clicked(self,widget,data=None): | def on_button_defaut_time_between_sequences_clicked(self, widget, data=None): | def on_button_defaut_time_between_sequences_clicked(self,widget,data=None): adjustmentTimeBetweenSequence = self.builder.get_object("adjustmentTimeBetweenSequence") exercice = Exercise() adjustmentTimeBetweenSequence.set_value(exercice.get_time_between_sequence()) | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_defaut_maximum_sequence_time_clicked(self,widget,data=None): | def on_button_defaut_maximum_sequence_time_clicked(self, widget, data=None): | def on_button_defaut_maximum_sequence_time_clicked(self,widget,data=None): adjustmentMaximumSequenceTime = self.builder.get_object("adjustmentMaximumSequenceTime") exercice = Exercise() adjustmentMaximumSequenceTime.set_value(exercice.get_max_sequence_length()) | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_defaut_time_before_sequence_clicked(self,widget,data=None): | def on_button_defaut_time_before_sequence_clicked(self, widget, data=None): | def on_button_defaut_time_before_sequence_clicked(self,widget,data=None): adjustmentTimeBeforeSequence = self.builder.get_object("adjustmentTimeBeforeSequence") exercice = Exercise() adjustmentTimeBeforeSequence.set_value(exercice.get_play_margin_before()) | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
def on_button_defaut_time_after_sequence_clicked(self,widget,data=None): | def on_button_defaut_time_after_sequence_clicked(self, widget, data=None): | def on_button_defaut_time_after_sequence_clicked(self,widget,data=None): adjustmentTimeAfterSequence = self.builder.get_object("adjustmentTimeAfterSequence") exercice = Exercise() adjustmentTimeAfterSequence.set_value(exercice.get_play_margin_after()) | 4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py |
if self.core.GetCanSave(): self.core.Save() | self.core.Save() | def on_MainWindow_delete_event(self,widget,data=None): if not self.config.Get("autosave"): if not self.core.GetCanSave(): gtk.main_quit() return False | 688ec6353c389457c8142d66fb00b927ec013879 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/688ec6353c389457c8142d66fb00b927ec013879/gui.py |
def test_affd(): | def testAffd(): | def test_affd(): pass | 0c0054c4d7a983aa1c59c7634c9c90e2d41112e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0c0054c4d7a983aa1c59c7634c9c90e2d41112e3/testPep.py |
def test_bddr(): | def testBddr(): | def test_bddr(): pass | 0c0054c4d7a983aa1c59c7634c9c90e2d41112e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0c0054c4d7a983aa1c59c7634c9c90e2d41112e3/testPep.py |
["test_affd", "test_bddr"]) | ["testAffd", "testBddr"]) | def test_ee(): pass | 0c0054c4d7a983aa1c59c7634c9c90e2d41112e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0c0054c4d7a983aa1c59c7634c9c90e2d41112e3/testPep.py |
def __init__(self): self.config = config | f3c5f80d89fc162f5c23893a2edf27c0e489849e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3c5f80d89fc162f5c23893a2edf27c0e489849e/gui.py | ||
def _updateLastOpenFilesTab(self): print "updateLastOpenFilesTab" gtkTree = self.builder.get_object("lastopenfilesTreeView") if not gtkTree.get_columns() == []: raise Exception treeViewColumn = gtk.TreeViewColumn(_("Path")) gtkTree.append_column(treeViewColumn) print gtkTree.get_columns() treeStore = gtk.TreeStore(st... | f3c5f80d89fc162f5c23893a2edf27c0e489849e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3c5f80d89fc162f5c23893a2edf27c0e489849e/gui.py | ||
gtkTree.append_column(treeViewColumn) | treeViewColumn.pack_start(cell, False) treeViewColumn.add_attribute(cell, 'markup', 0) treeViewColumn.set_expand(False) gtkTree.append_column(treeViewColumn) | def _updateLastOpenFilesTab(self): print "updateLastOpenFilesTab" gtkTree = self.builder.get_object("lastopenfilesTreeView") if not gtkTree.get_columns() == []: raise Exception treeViewColumn = gtk.TreeViewColumn(_("Path")) gtkTree.append_column(treeViewColumn) print gtkTree.get_columns() treeStore = gtk.TreeStore(st... | f3c5f80d89fc162f5c23893a2edf27c0e489849e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3c5f80d89fc162f5c23893a2edf27c0e489849e/gui.py |
def _updateLastOpenFilesTab(self): print "updateLastOpenFilesTab" gtkTree = self.builder.get_object("lastopenfilesTreeView") if not gtkTree.get_columns() == []: raise Exception treeViewColumn = gtk.TreeViewColumn(_("Path")) gtkTree.append_column(treeViewColumn) print gtkTree.get_columns() treeStore = gtk.TreeStore(st... | f3c5f80d89fc162f5c23893a2edf27c0e489849e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3c5f80d89fc162f5c23893a2edf27c0e489849e/gui.py | ||
def _updateLastOpenFilesTab(self): print "updateLastOpenFilesTab" gtkTree = self.builder.get_object("lastopenfilesTreeView") if not gtkTree.get_columns() == []: raise Exception treeViewColumn = gtk.TreeViewColumn(_("Path")) gtkTree.append_column(treeViewColumn) print gtkTree.get_columns() treeStore = gtk.TreeStore(st... | f3c5f80d89fc162f5c23893a2edf27c0e489849e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3c5f80d89fc162f5c23893a2edf27c0e489849e/gui.py | ||
if self.core.GetCanSave(): self.core.Save() | self.core.Save() | def on_MainWindow_delete_event(self,widget,data=None): if not self.config.Get("autosave"): if not self.core.GetCanSave(): gtk.main_quit() return False | bf045f2c8d98a9e6ff4da3ca65a805a01e54f5e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/bf045f2c8d98a9e6ff4da3ca65a805a01e54f5e6/gui.py |
self.connect("confirm-overwrite", self.__cb_confirm_overwrite) def __cb_confirm_overwrite(self, widget, data = None): "Handles confirm-overwrite signals" try: FileReplace(self, io.file_normpath(self.get_uri())).run() except: return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN else: return gtk.FILE_CHOOSER_CONFIRMATI... | def __init__(self, parent): FileSelector.__init__( self, parent, _('Select File to Save to'), gtk.FILE_CHOOSER_ACTION_SAVE, gtk.STOCK_SAVE ) | dd18cc846c5f3e58f6ab758e33e05fff6e16d554 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/dd18cc846c5f3e58f6ab758e33e05fff6e16d554/gui.py | |
self.activate_video_area(True) | def on_sync_message(self, bus, message): if message.structure is None: return message_name = message.structure.get_name() if message_name == "prepare-xwindow-id": gtk.gdk.threads_enter() gtk.gdk.display_get_default().sync() imagesink = message.src imagesink.set_property("force-aspect-ratio", True) imagesink.set_xwindow... | 1ac33039644fe42a784f255d789934dcd84c578e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/1ac33039644fe42a784f255d789934dcd84c578e/video_player.py | |
def activate_video_callback(self, activateVideo): self.activateVideo = activateVideo | def activate_video_callback(self, activate_video): self.activate_video_area = activate_video | def activate_video_callback(self, activateVideo): self.activateVideo = activateVideo | 1ac33039644fe42a784f255d789934dcd84c578e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/1ac33039644fe42a784f255d789934dcd84c578e/video_player.py |
def Save(self, saveAs = False): if not self.exercise: print "Error core.save called but no exercise load" return | b7627157ed3f669548c81600066735eec2345673 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b7627157ed3f669548c81600066735eec2345673/core.py | ||
def _updateProperties(self): | def UpdateProperties(self): | def _updateProperties(self): self.exercise.Initialize() self._Reload(True) self.SetCanSave(True) self._ActivateSequence() self.GotoSequenceBegin(True) self.Play() | b7627157ed3f669548c81600066735eec2345673 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b7627157ed3f669548c81600066735eec2345673/core.py |
elif os.path.isfile(os.path.join(self.Get("script"), '/data/config')): configParser.read("../data/config") | elif os.path.isfile(os.path.join(self.Get("script"), 'data/config')): configParser.read(os.path.join(self.Get("script"), 'data/config')) | def _loadConfigFiles(self): """Load the config files and add it to configParser All modifiable options must be on data/config""" self._localConfFilHref = os.path.join( self.Get("localConfigDir"), "config") self._globalConfFilHref = os.path.join( self.Get("globalConfigDir"), "config") | 355b9aad74a59c4fed3a4657852802fa97cc5676 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/355b9aad74a59c4fed3a4657852802fa97cc5676/config.py |
print "Error : global conf file 'config' not found" | print "Error : global conf file 'config' not found at "+ os.path.join(self.Get("script"), 'data/config') | def _loadConfigFiles(self): """Load the config files and add it to configParser All modifiable options must be on data/config""" self._localConfFilHref = os.path.join( self.Get("localConfigDir"), "config") self._globalConfFilHref = os.path.join( self.Get("globalConfigDir"), "config") | 355b9aad74a59c4fed3a4657852802fa97cc5676 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/355b9aad74a59c4fed3a4657852802fa97cc5676/config.py |
m = re.search('([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]{3}) --> ([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]{3})', line) | regexp = '([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]+) --> ([0-9]{2}):([0-9]{2}):([0-9]{2}),([0-9]+)' if re.search(regexp,line): m = re.search(regexp, line) | def GetSubtitleList(self, path): outputList = [] f = self.convertFile(path) #f = open(path, 'r') state = SubtitlesLoader.LOOK_FOR_ID for line in f: line = line.rstrip() line = line.decode("utf8") | b68affc2d7cadc8e5959cebfc0e485be7d358963 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b68affc2d7cadc8e5959cebfc0e485be7d358963/subtitles_loader.py |
beginTime = int(m.group(1))*1000*3600 beginTime += int(m.group(2))*1000*60 beginTime += int(m.group(3))*1000 beginTime += int(m.group(4)) | beginMili = m.group(4) while len(beginMili) < 3: beginMili += "0" | def GetSubtitleList(self, path): outputList = [] f = self.convertFile(path) #f = open(path, 'r') state = SubtitlesLoader.LOOK_FOR_ID for line in f: line = line.rstrip() line = line.decode("utf8") | b68affc2d7cadc8e5959cebfc0e485be7d358963 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b68affc2d7cadc8e5959cebfc0e485be7d358963/subtitles_loader.py |
endTime = int(m.group(5))*1000*3600 endTime += int(m.group(6))*1000*60 endTime += int(m.group(7))*1000 endTime += int(m.group(8)) | endMili = m.group(8) while len(endMili) < 3: endMili += "0" | def GetSubtitleList(self, path): outputList = [] f = self.convertFile(path) #f = open(path, 'r') state = SubtitlesLoader.LOOK_FOR_ID for line in f: line = line.rstrip() line = line.decode("utf8") | b68affc2d7cadc8e5959cebfc0e485be7d358963 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b68affc2d7cadc8e5959cebfc0e485be7d358963/subtitles_loader.py |
current.SetTimeBegin(beginTime) current.SetTimeEnd(endTime) current.SetText('') state = SubtitlesLoader.LOOK_FOR_TEXT | beginTime = int(m.group(1))*1000*3600 beginTime += int(m.group(2))*1000*60 beginTime += int(m.group(3))*1000 beginTime += int(beginMili) endTime = int(m.group(5))*1000*3600 endTime += int(m.group(6))*1000*60 endTime += int(m.group(7))*1000 endTime += int(endMili) current.SetTimeBegin(beginTime) current.SetTimeEnd(end... | def GetSubtitleList(self, path): outputList = [] f = self.convertFile(path) #f = open(path, 'r') state = SubtitlesLoader.LOOK_FOR_ID for line in f: line = line.rstrip() line = line.decode("utf8") | b68affc2d7cadc8e5959cebfc0e485be7d358963 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b68affc2d7cadc8e5959cebfc0e485be7d358963/subtitles_loader.py |
self.treeStoreDetails.append(None,["<b>"+_("Done path")+"</b>",exo.get_done_path()]) | self.treeStoreDetails.append(None,["<b>"+_("Finished exercise path")+"</b>",exo.get_done_path()]) | def _update_details_tree_view(self): print "_update_details_tree_view" self.treeStoreDetails = gtk.TreeStore(str,str) | 846fb98c011b1302bb2b167957eb2d52a00f160b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/846fb98c011b1302bb2b167957eb2d52a00f160b/gui_exercise_manager.py |
else: print self.gui.config.Get("lastopenfile") | elif self.gui.config.Get("lastopenfile"): print "last open file : " + self.gui.config.Get("lastopenfile") | def run(self): if len(sys.argv) > 1: path = os.path.abspath(sys.argv[1]) self.core.LoadExercice( path ) else: print self.gui.config.Get("lastopenfile") self.core.LoadExercice(self.gui.config.Get("lastopenfile")) | 7d2e0c5baedd7397ff98068d7f0451deadefe281 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/7d2e0c5baedd7397ff98068d7f0451deadefe281/perroquet.py |
wordList.append(word.getText()) | wordList.append(word.getValid()) | def ExtractWordList(self): wordList = [] | cdab4015e66a6654ccdef055db7e53a2c1ad6558 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/cdab4015e66a6654ccdef055db7e53a2c1ad6558/sub_exercise.py |
raise NotImplementedError | pass | def update_after_write(self): "update after a modification of the text" raise NotImplementedError | f3e48ca0452fa5376d577996b81be49a46bf7063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/f3e48ca0452fa5376d577996b81be49a46bf7063/sequence.py |
self.updateWord(" ", 0, isEmpty=True) | self.UpdateWord(" ", 0, isEmpty=True) | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f/gui.py |
self.updateWord(sequence.GetWordList()[i], 0, isFound=True) | self.UpdateWord(sequence.GetWordList()[i], 0, isFound=True) | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f/gui.py |
self.updateWord(sequence.GetWorkList()[i], sequence.GetValidity(i)) | self.UpdateWord(sequence.GetWorkList()[i], sequence.GetValidity(i)) | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f/gui.py |
def AddWordToFound(self, word, validity, isFound=False, isEmpty=False): | def UpdateWord(self, word, validity, isFound=False, isEmpty=False): | def AddWordToFound(self, word, validity, isFound=False, isEmpty=False): buffer = self.typeLabel.get_buffer() iter1 = buffer.get_end_iter() size = buffer.get_char_count() buffer.insert(iter1,word) iter1 = buffer.get_iter_at_offset(size) iter2 = buffer.get_end_iter() | 2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f/gui.py |
path = result | def AskSavePath(self): saver = SaveFileSelector(self.window) path =saver.run() if path == None: return | 2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/2f5c92de3bbb22eae7e5fc6175f0f38b4154fd1f/gui.py | |
outputList.append(current) | if len(current.get_text()) > 0: outputList.append(current) | def get_subtitle_list(self, path): outputList = [] f = self.convert_file(path) #f = open(path, 'r') state = SubtitlesLoader.LOOK_FOR_ID for line in f: line = line.rstrip() line = line.decode("utf8") | 0488555f77bada10396a344d1fcc20947c587d04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/0488555f77bada10396a344d1fcc20947c587d04/subtitles_loader.py |
def first(self, testFunction, items, finalItem=None): """Return the name with the first item that match the test function. If impossible, match with finalItem test: item -> bool (for ex os.path.exists, os.path.isfile...) """ l=(i for i, item in enumerate(items) if testFunction(item)) try: firstItemIndex=l.next() e... | class Config: """Usage: config = Config() Warning: all keys must be lowercase""" def __init__(self): self._properties = {} self._writableParsers = [] def loadWritableConfigFile(self, writablePath, referencePath): """Load an ini config file that can be modified. Don't deal with file management""" parser = ConfigParser... | def first(self, testFunction, items, finalItem=None): #FIXME many paths """Return the name with the first item that match the test function. If impossible, match with finalItem test: item -> bool (for ex os.path.exists, os.path.isfile...) """ l=(i for i, item in enumerate(items) if testFunction(item)) try: firstIt... | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
class ConfigSingleton(object): """useful for gettexe""" _instance = None def __new__(cls): if cls._instance is None: cls._instance = object.__new__(cls) cls._instance.init() return cls._instance class configFile: def __init__(self, writablePath, referencePath): self.writablePath = writablePath self.referencePath = re... | for section in localParser.sections(): for (key, value) in localParser.items(section): parser.set(section, key, value) | def first(self, testFunction, items, finalItem=None): #FIXME many paths """Return the name with the first item that match the test function. If impossible, match with finalItem test: item -> bool (for ex os.path.exists, os.path.isfile...) """ l=(i for i, item in enumerate(items) if testFunction(item)) try: firstIt... | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
def getKeys(self): pass def save(self): pass class emptyConfig(ConfigSingleton): """usage: config = Config() Warning: all keys must be lowercase""" def init(self): self._properties = {} self._writableOptions = {} self._setLocalPaths(); configParser = self._loadConfigFiles() self._properties.update( dict(configParse... | for section in parser.sections(): for (key, value) in parser.items(section): self.Set(key, value) self._writableParsers.append((localParser, writableOptions, writablePath)) | def getKeys(self): pass | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
"""get a propertie""" | """Get a propertie""" | def Get(self, key): """get a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" return self._properties[key] | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
if key in self._writableOptions.keys(): section = self._writableOptions[key] if not self._localConfigParser.has_section(section): self._localConfigParser.add_section(section) self._localConfigParser.set(section, key, value) | for (parser, writableOptions, _) in self._writableParsers: if key in writableOptions.keys(): section = writableOptions[key] if not parser.has_section(section): localParser.add_section(section) parser.set(section, key, value) | def Set(self, key, value): """Set a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
if not os.path.exists(self.Get("localconfigdir")): os.mkdir( self.Get("localconfigdir") ) self._localConfigParser.write( open(self._localConfFilHref, "w")) def loadRepositorySources(self): localSourceFile = os.path.join( self.Get("localconfigdir"), "sources.conf") globalSourceFile = os.path.join( self.Get("globalconf... | for (parser, _, path) in self._writableParsers: parser.write(path) | def Save(self): """Save the properties that have changed""" #FIXME: need to create the whole path, not only the final dir if not os.path.exists(self.Get("localconfigdir")): os.mkdir( self.Get("localconfigdir") ) self._localConfigParser.write( open(self._localConfFilHref, "w")) | 20674a804872a44c42b262d942713e54b69ccd06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/20674a804872a44c42b262d942713e54b69ccd06/config2.py |
for word in self.word_list: if re.search(filter_regexp, word): filtered_word_list.append(word) | if not self.core.get_exercise().is_lock_help(): for word in self.word_list: if re.search(filter_regexp, word): filtered_word_list.append(word) | def update_word_list(self): """Apply filter and send the new list to the gui""" | 107c27d328b684d87a35d557113c5b8a3bb8ca4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/107c27d328b684d87a35d557113c5b8a3bb8ca4c/gui_controller.py |
if not self.core.exercise.get_current_sequence().is_valid(): | if not self.core.exercise.get_current_sequence().is_valid() and not self.core.get_exercise().is_lock_help(): | def notify_key_press(self, keyname, shift, control): if keyname == "Return" or keyname == "KP_Enter": if not self.core.exercise.get_current_sequence().is_valid(): self.core.user_repeat() self.core.repeat_sequence() elif keyname == "BackSpace": if not self.core.exercise.get_current_sequence().is_valid(): self.core.delet... | 107c27d328b684d87a35d557113c5b8a3bb8ca4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/107c27d328b684d87a35d557113c5b8a3bb8ca4c/gui_controller.py |
elif keyname == "F2": | elif keyname == "F2" and not self.core.get_exercise().is_lock_help(): | def notify_key_press(self, keyname, shift, control): if keyname == "Return" or keyname == "KP_Enter": if not self.core.exercise.get_current_sequence().is_valid(): self.core.user_repeat() self.core.repeat_sequence() elif keyname == "BackSpace": if not self.core.exercise.get_current_sequence().is_valid(): self.core.delet... | 107c27d328b684d87a35d557113c5b8a3bb8ca4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/107c27d328b684d87a35d557113c5b8a3bb8ca4c/gui_controller.py |
pass | self._update() | def write_char(self, char): if self.exercise.is_character_match(char): self.exercise.get_current_sequence().write_char(char) self._update() self.set_can_save(True) else: pass | a43bd02545fe96ef1b3df9d590ea97fd9995cb57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/a43bd02545fe96ef1b3df9d590ea97fd9995cb57/core.py |
except Exception as e: | except Exception, e: | def install_app(self, remove=False): if self.noapp: return | 7a2db4c2925d50e6a4ec37bcc84e842b50fdbe70 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/7a2db4c2925d50e6a4ec37bcc84e842b50fdbe70/main.py |
from optparse import OptionParser | def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not... | 0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302/enpkg.py | |
if opts.proxy: from proxy.api import setup_proxy setup_proxy(opts.proxy) | def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not... | 0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302/enpkg.py | |
if (not opts.proxy) and conf['proxy']: from proxy.api import setup_proxy | if opts.proxy: setup_proxy(opts.proxy) elif conf['proxy']: | def main(): from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] [name] [version]", description=__doc__) p.add_option("--config", action="store_true", help="display the configuration and exit") p.add_option('-f', "--force", action="store_true", help="force install the main package " "(not... | 0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/0ea235ea4e6a9cc87e99f7a47d52e5a3265e3302/enpkg.py |
_placehold_pat = re.compile('/PLACEHOLD' * 5 + '([^\0]*)\0') | _placehold_pat = re.compile('/PLACEHOLD' * 5 + '([^\0\\s]*)\0') | def find_lib(fn): for tgt in _targets: dst = abspath(join(tgt, fn)) if exists(dst): return dst print "ERROR: library %r not found" % fn return join('/ERROR/path/not/found', fn) | ff847fc8133f93baf2322d8d1495cd2ebe342e97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/ff847fc8133f93baf2322d8d1495cd2ebe342e97/object_code.py |
def input_userpass(): from getpass import getpass print """\ | b865c214a5932b08c2126f2d94a705301d764c13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/b865c214a5932b08c2126f2d94a705301d764c13/config.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.