bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
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... | 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... | 465,300 |
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()) | def _get_orphan_exercise_repository_list(self,repositoryListIn): repoPathList = os.listdir(config.get("local_repo_root_dir")) repoUsedPath = [] repositoryList = [] for repo in repositoryListIn: repoUsedPath.append(repo.get_local_path()) | 465,301 |
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()) | 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()) | 465,302 |
def import_package(self, import_path): | def import_package(self, import_path): | 465,303 |
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-... | defLoad(self,text):self.symbolList=[]self.wordList=[]self.workList=[]self.workValidityList=[]textToParse=textself.activeWordIndex=0self.activeWordPos=0self.helpChar='~'whilelen(textToParse)>0:ifre.match('^([0-9\'a-zA-Z]+)[^0-9\'a-zA-Z]',textToParse):m=re.search('^([0-9\'a-zA-Z]+)[^0-9\'a-zA-Z]',textToParse)word=m.group... | 465,304 |
def _find_mo_files (self): data_files = [] | def _find_mo_files (self): data_files = [] | 465,305 |
def WorkChange(self): """Update the validity of the current word""" self.ComputeValidity(self.activeWordIndex) | def WorkChange(self): """Update the validity of the current word""" self.ComputeValidity(self.activeWordIndex) | 465,306 |
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 | 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 | 465,307 |
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.... | def"""Check if the word is correct but at the wrong place.""" CheckLocation(self,"""Check if the word is correct but at the wrong place.""" index):"""Check if the word is correct but at the wrong place.""" #"""Check if the word is correct but at the wrong place.""" Check"""Check if the word is correct but at the wrong ... | 465,308 |
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) | def set_lock_correction(self, state, new_password = None): self.lock_correction = state if new_password is not None: salt = "" pop = string.hexdigits while len(salt) < 6: salt += random.choice(pop) | 465,309 |
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) | 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) | 465,310 |
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") | 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") | 465,311 |
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") | 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") | 465,312 |
def __new__(cls): if cls._instance is None: cls._instance = object.__new__(cls) cls._instance.init() return cls._instance | def __new__(cls): if cls._instance is None: cls._instance = object.__new__(cls) cls._instance.init() return cls._instance | 465,313 |
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... | 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... | 465,314 |
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, ... | 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") self.configParser = ConfigParser.ConfigParser() if len( self.configParser.read(href)) == 0: print "No conf file find" for (key, values... | 465,315 |
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, ... | def _load_Files(self): href = os.path.join( self.Get("config_dir", "config") configParser = ConfigParser.ConfigParser() if len( 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, value) | 465,316 |
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, ... | 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, ... | 465,317 |
def Get(self, key): | defGet(self,key): | 465,318 |
def set_visible_lateral_panel(self, state): if state: self.builder.get_object("vbox2").show() else: self.builder.get_object("vbox2").hide() | def set_visible_lateral_panel(self, state): if state: self.builder.get_object("lateralPanel").show() else: self.builder.get_object("vbox2").hide() | 465,319 |
def set_visible_lateral_panel(self, state): if state: self.builder.get_object("vbox2").show() else: self.builder.get_object("vbox2").hide() | def set_visible_lateral_panel(self, state): if state: self.builder.get_object("vbox2").show() else: self.builder.get_object("vbox2").hide() | 465,320 |
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) | def on_checkmenuitem_correction_toggled(self, widget, data=None): toolbutton_show_correction = self.builder.get_object("toolbutton_show_correction") self.controller.notify_toogle_correction(toolbutton_show_correction.props.active) | 465,321 |
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) | def on_toolbutton_show_correction_toggled(self, widget, data=None): toolbutton_show_correction = self.builder.get_object("toolbutton_show_correction") self.controller.notify_toogle_correction(toolbutton_show_correction.props.active) | 465,322 |
def set_visible_play(self, state): if state: self.builder.get_object("toolbuttonPlay").show() else: self.builder.get_object("toolbuttonPlay").shide() | def set_visible_play(self, state): if state: self.builder.get_object("toolbuttonPlay").show() else: self.builder.get_object("toolbuttonPlay").shide() | 465,323 |
def set_visible_pause(self, state): if state: self.builder.get_object("toolbuttonPause").show() else: self.builder.get_object("toolbuttonPause").shide() | def set_visible_pause(self, state): if state: self.builder.get_object("toolbuttonPause").show() else: self.builder.get_object("toolbuttonPause").shide() | 465,324 |
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() | def notify_toogle_correction(self,visible): self.gui.logger.debug("notify_toogle_correction") self.gui.logger.debug("visible="+str(visible)+" , correction_visible="+str(self.correction_visible)) if visible != self.correction_visible: self.toggle_correction() | 465,325 |
def _find_mo_files (self): data_files = [] | def _find_mo_files (self): data_files = [] | 465,326 |
def Save(self, saveAs = False): | def Save(self, saveAs = False): | 465,327 |
def Save(self, saveAs = False): | def Save(self, saveAs = False): | 465,328 |
def _find_mo_files (self): data_files = [] | def _find_mo_files (self): data_files = [] | 465,329 |
def load(self): | def load(self): | 465,330 |
def load(self): | def load(self): | 465,331 |
def load(self): | def load(self): | 465,332 |
def load(self): | def load(self): | 465,333 |
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() | 465,334 |
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() | 465,335 |
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... | 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... | 465,336 |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | def on_button_exercise_prop_ok_clicked(self, widget, data=None): self.__store_path_changes() | 465,337 |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 465,338 |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 465,339 |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 465,340 |
def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | def on_button_exercise_prop_ok_clicked(self,widget,data=None): self.__store_path_changes() | 465,341 |
def on_button_exercise_prop_cancel_clicked(self,widget,data=None): self.dialog.response(gtk.RESPONSE_CANCEL) | def on_button_exercise_prop_cancel_clicked(self, widget, data=None): self.dialog.response(gtk.RESPONSE_CANCEL) | 465,342 |
def __store_path_changes(self): | def __store_path_changes(self): | 465,343 |
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() | 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() | 465,344 |
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() | 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() | 465,345 |
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... | 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.iterP... | 465,346 |
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... | def on_button_add_path_clicked(self,widget,data=None): self.__store_path_changes() 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_af... | 465,347 |
def on_button_remove_path_clicked(self,widget,data=None): self.pathListStore.remove(self.iterPath) self.iterPath = None self._update_path_buttons() | def on_button_remove_path_clicked(self, widget, data=None): self.pathListStore.remove(self.iterPath) self.iterPath = None self._update_path_buttons() | 465,348 |
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()) | 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()) | 465,349 |
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()) | 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()) | 465,350 |
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()) | 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()) | 465,351 |
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()) | 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()) | 465,352 |
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 | 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 | 465,353 |
def test_affd(): pass | def testAffd(): pass | 465,354 |
def test_bddr(): pass | def testBddr(): pass | 465,355 |
def test_ee(): pass | def test_ee(): pass | 465,356 |
def __init__(self): self.config = config | def __init__(self): self.config = config | 465,357 |
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... | 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... | 465,358 |
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... | def _updateLastOpenFilesTab(self): print "updateLastOpenFilesTab" gtkTree = self.builder.get_object("lastopenfilesTreeView") if not gtkTree.get_columns() == []: raise Exception treeViewColumn = gtk.TreeViewColumn(_("Path")) treeViewColumn.pack_start(cell, False) treeViewColumn.add_attribute(cell, 'markup', 0) treeView... | 465,359 |
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... | 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... | 465,360 |
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... | 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... | 465,361 |
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 | 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 | 465,362 |
def __init__(self, parent): FileSelector.__init__( self, parent, _('Select File to Save to'), gtk.FILE_CHOOSER_ACTION_SAVE, gtk.STOCK_SAVE ) | def __init__(self, parent): FileSelector.__init__( self, parent, _('Select File to Save to'), gtk.FILE_CHOOSER_ACTION_SAVE, gtk.STOCK_SAVE ) | 465,363 |
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... | defself.activate_video_area(True) on_sync_message(self,self.activate_video_area(True) bus,self.activate_video_area(True) message):self.activate_video_area(True) ifself.activate_video_area(True) message.structureself.activate_video_area(True) isself.activate_video_area(True) None:self.activate_video_area(True) returnsel... | 465,364 |
def activate_video_callback(self, activateVideo): self.activateVideo = activateVideo | def activate_video_callback(self, activateVideo): self.activateVideo = activateVideo | 465,365 |
def Save(self, saveAs = False): if not self.exercise: print "Error core.save called but no exercise load" return | def Save(self, saveAs = False): if not self.exercise: print "Error core.save called but no exercise load" return | 465,366 |
def _updateProperties(self): self.exercise.Initialize() self._Reload(True) self.SetCanSave(True) self._ActivateSequence() self.GotoSequenceBegin(True) self.Play() | def UpdateProperties(self): self.exercise.Initialize() self._Reload(True) self.SetCanSave(True) self._ActivateSequence() self.GotoSequenceBegin(True) self.Play() | 465,367 |
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") | 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") | 465,368 |
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") | 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") | 465,369 |
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") | 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") | 465,370 |
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") | 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") | 465,371 |
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") | 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") | 465,372 |
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") | 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") | 465,373 |
def _update_details_tree_view(self): print "_update_details_tree_view" self.treeStoreDetails = gtk.TreeStore(str,str) | def _update_details_tree_view(self): print "_update_details_tree_view" self.treeStoreDetails = gtk.TreeStore(str,str) | 465,374 |
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")) | def run(self): if len(sys.argv) > 1: path = os.path.abspath(sys.argv[1]) self.core.LoadExercice( path ) elif self.gui.config.Get("lastopenfile"): print "last open file : " + self.gui.config.Get("lastopenfile") self.core.LoadExercice(self.gui.config.Get("lastopenfile")) | 465,375 |
def ExtractWordList(self): wordList = [] | def ExtractWordList(self): wordList = [] | 465,376 |
def update_after_write(self): "update after a modification of the text" raise NotImplementedError | def update_after_write(self): "update after a modification of the text" raise NotImplementedError | 465,377 |
def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 465,378 |
def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 465,379 |
def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | def SetSequence(self, sequence): self.disableChangedTextEvent = True self.ClearBuffer() i = 0 pos = 1 cursor_pos = 0 | 465,380 |
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() | def UpdateWord(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() | 465,381 |
def AskSavePath(self): saver = SaveFileSelector(self.window) path =saver.run() if path == None: return | def AskSavePath(self): saver = SaveFileSelector(self.window) path =saver.run() if path == None: return | 465,382 |
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") | 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") | 465,383 |
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... | 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... | 465,384 |
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... | 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... | 465,385 |
def getKeys(self): pass | def getKeys(self): pass | 465,386 |
def Get(self, key): """get a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" return self._properties[key] | def Get(self, key): """Get a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" return self._properties[key] | 465,387 |
def Set(self, key, value): """Set a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" | def Set(self, key, value): """Set a propertie""" if not key.islower(): raise KeyError, key+" is not lowercase" | 465,388 |
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")) | 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")) | 465,389 |
def update_word_list(self): """Apply filter and send the new list to the gui""" | def update_word_list(self): """Apply filter and send the new list to the gui""" | 465,390 |
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... | 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() and not self.core.get_exercise().is_lock_help(): self.core.user_repeat() self.core.repeat_sequence() elif keyname == "BackSpace": if not self.core.exercise.ge... | 465,391 |
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... | 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... | 465,392 |
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 | 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 | 465,393 |
def install_app(self, remove=False): if self.noapp: return | def install_app(self, remove=False): if self.noapp: return | 465,394 |
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... | def main(): 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 it's dependencies, see --forceall)... | 465,395 |
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... | 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... | 465,396 |
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... | 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... | 465,397 |
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) | 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) | 465,398 |
def input_userpass(): from getpass import getpass print """\ | def input_userpass(): from getpass import getpass print """\ | 465,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.