Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
orca /
[ HOME SHELL ]
Name
Size
Permission
Action
backends
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
acss.py
3.49
KB
-rw-r--r--
bookmarks.py
8.37
KB
-rw-r--r--
braille_generator.py
21
KB
-rw-r--r--
braille.py
70.54
KB
-rw-r--r--
braille_rolenames.py
10.33
KB
-rw-r--r--
brlmon.py
6.45
KB
-rw-r--r--
brltablenames.py
7.3
KB
-rw-r--r--
caret_navigation.py
13.66
KB
-rw-r--r--
chat.py
33.71
KB
-rw-r--r--
chnames.py
23.03
KB
-rw-r--r--
cmdnames.py
55.23
KB
-rw-r--r--
colornames.py
38.13
KB
-rw-r--r--
common_keyboardmap.py
6.64
KB
-rw-r--r--
debug.py
17.79
KB
-rw-r--r--
desktop_keyboardmap.py
4.62
KB
-rw-r--r--
event_manager.py
41.45
KB
-rw-r--r--
eventsynthesizer.py
18.13
KB
-rw-r--r--
find.py
12.77
KB
-rw-r--r--
flat_review.py
48.16
KB
-rw-r--r--
formatting.py
55.22
KB
-rw-r--r--
generator.py
60.81
KB
-rw-r--r--
guilabels.py
46.35
KB
-rw-r--r--
__init__.py
115
B
-rw-r--r--
input_event.py
40.29
KB
-rw-r--r--
keybindings.py
17.82
KB
-rw-r--r--
keynames.py
9.71
KB
-rw-r--r--
label_inference.py
21.29
KB
-rw-r--r--
laptop_keyboardmap.py
4.61
KB
-rw-r--r--
liveregions.py
21.77
KB
-rw-r--r--
logger.py
1.97
KB
-rw-r--r--
mathsymbols.py
88.14
KB
-rw-r--r--
messages.py
141.35
KB
-rw-r--r--
mouse_review.py
21.57
KB
-rw-r--r--
notification_messages.py
6.18
KB
-rw-r--r--
object_properties.py
33.38
KB
-rw-r--r--
orca_gtkbuilder.py
5.35
KB
-rw-r--r--
orca_gui_commandlist.py
4.19
KB
-rw-r--r--
orca_gui_find.py
8.12
KB
-rw-r--r--
orca_gui_navlist.py
6.66
KB
-rw-r--r--
orca_gui_prefs.py
139.1
KB
-rw-r--r--
orca_gui_profile.py
4.06
KB
-rw-r--r--
orca_i18n.py
3.18
KB
-rw-r--r--
orca_platform.py
1.44
KB
-rw-r--r--
orca.py
27.86
KB
-rw-r--r--
orca_state.py
2.4
KB
-rw-r--r--
phonnames.py
2.76
KB
-rw-r--r--
pronunciation_dict.py
2.61
KB
-rw-r--r--
punctuation_settings.py
13.64
KB
-rw-r--r--
script_manager.py
14.37
KB
-rw-r--r--
script.py
19.04
KB
-rw-r--r--
script_utilities.py
201.5
KB
-rw-r--r--
settings_manager.py
24.55
KB
-rw-r--r--
settings.py
12.88
KB
-rw-r--r--
sound_generator.py
11.99
KB
-rw-r--r--
sound.py
5.47
KB
-rw-r--r--
speechdispatcherfactory.py
26.19
KB
-rw-r--r--
speech_generator.py
113.82
KB
-rw-r--r--
speech.py
10.22
KB
-rw-r--r--
speechserver.py
6.92
KB
-rw-r--r--
spellcheck.py
10.07
KB
-rw-r--r--
structural_navigation.py
124.25
KB
-rw-r--r--
text_attribute_names.py
28.62
KB
-rw-r--r--
tutorialgenerator.py
30.41
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : find.py
# Orca # # Copyright 2006-2008 Sun Microsystems Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., Franklin Street, Fifth Floor, # Boston MA 02110-1301 USA. """Provides support for a flat review find.""" __id__ = "$Id$" __version__ = "$Revision$" __date__ = "$Date$" __copyright__ = "Copyright (c) 2005-2008 Sun Microsystems Inc." __license__ = "LGPL" import copy import re from . import debug from . import flat_review from . import messages from . import orca_state class SearchQuery: """Represents a search that the user wants to perform.""" def __init__(self): """Creates a new SearchQuery. A searchQuery has the following properties: searchString - the string to find searchBackwards - if true, search upward for matches caseSensitive - if true, case counts matchEntireWord - if true, only match on the entire string startAtTop - if true, begin the search from the top of the window, rather than at the current location windowWrap - if true, when the top/bottom edge of the window is reached wrap to the bottom/top and continue searching """ self.searchString = "" self.searchBackwards = False self.caseSensitive = False self.matchEntireWord = False self.windowWrap = False self.startAtTop = False self.debugLevel = debug.LEVEL_FINEST def debugContext(self, context, string): """Prints out the context and the string to find to debug.out""" debug.println(self.debugLevel, \ "------------------------------------------------------------") debug.println(self.debugLevel, \ "findQuery: %s line=%d zone=%d word=%d char=%d" \ % (string, context.lineIndex, context.zoneIndex, \ context.wordIndex, context.charIndex)) debug.println(self.debugLevel, \ "Number of lines: %d" % len(context.lines)) debug.println(self.debugLevel, \ "Number of zones in current line: %d" % \ len(context.lines[context.lineIndex].zones)) debug.println(self.debugLevel, \ "Number of words in current zone: %d" % \ len(context.lines[context.lineIndex].zones[context.zoneIndex].words)) debug.println(self.debugLevel, \ "==========================================================\n\n") def dumpContext(self, context): """Debug utility which prints out the context.""" print("DUMP") for i in range(0, len(context.lines)): print(" Line %d" % i) for j in range(0, len(context.lines[i].zones)): print(" Zone: %d" % j) for k in range(0, len(context.lines[i].zones[j].words)): print(" Word %d = `%s` len(word): %d" % \ (k, context.lines[i].zones[j].words[k].string, \ len(context.lines[i].zones[j].words[k].string))) def findQuery(self, context, justEnteredFlatReview): """Performs a search on the string specified in searchQuery. Arguments: - context: The context from active script - justEnteredFlatReview: If true, we began the search in focus tracking mode. Returns: - The context of the match, if found """ # Get the starting context so that we can restore it at the end. # originalLineIndex = context.lineIndex originalZoneIndex = context.zoneIndex originalWordIndex = context.wordIndex originalCharIndex = context.charIndex debug.println(self.debugLevel, \ "findQuery: original context line=%d zone=%d word=%d char=%d" \ % (originalLineIndex, originalZoneIndex, \ originalWordIndex, originalCharIndex)) # self.dumpContext(context) flags = re.LOCALE if not self.caseSensitive: flags = flags | re.IGNORECASE if self.matchEntireWord: regexp = "\\b" + self.searchString + "\\b" else: regexp = self.searchString pattern = re.compile(regexp, flags) debug.println(self.debugLevel, \ "findQuery: startAtTop: %d regexp: `%s`" \ % (self.startAtTop, regexp)) if self.startAtTop: context.goBegin(flat_review.Context.WINDOW) self.debugContext(context, "go begin") location = None found = False wrappedYet = False doneWithLine = False while not found: # Check the current line for the string. # [currentLine, x, y, width, height] = \ context.getCurrent(flat_review.Context.LINE) debug.println(self.debugLevel, \ "findQuery: current line=`%s` x=%d y=%d width=%d height=%d" \ % (currentLine, x, y, width, height)) if re.search(pattern, currentLine) and not doneWithLine: # It's on this line. Check the current zone for the string. # while not found: [currentZone, x, y, width, height] = \ context.getCurrent(flat_review.Context.ZONE) debug.println(self.debugLevel, \ "findQuery: current zone=`%s` x=%d y=%d " % \ (currentZone, x, y)) debug.println(self.debugLevel, \ "width=%d height=%d" % (width, height)) if re.search(pattern, currentZone): # It's in this zone at least once. # theZone = context.lines[context.lineIndex] \ .zones[context.zoneIndex] startedInThisZone = \ (originalLineIndex == context.lineIndex) and \ (originalZoneIndex == context.zoneIndex) try: theZone.accessible.queryText() except: pass else: # Make a list of the character offsets for the # matches in this zone. # allMatches = re.finditer(pattern, currentZone) offsets = [] for m in allMatches: offsets.append(m.start(0)) if self.searchBackwards: offsets.reverse() i = 0 while not found and (i < len(offsets)): [nextInstance, offset] = \ theZone.getWordAtOffset(offsets[i]) if nextInstance: offsetDiff = \ nextInstance.index - context.wordIndex if self.searchBackwards \ and (offsetDiff < 0) \ or (not self.searchBackwards \ and offsetDiff > 0): context.wordIndex = nextInstance.index context.charIndex = 0 found = True elif not offsetDiff and \ (not startedInThisZone or \ justEnteredFlatReview): # We landed on a match by happenstance. # This can occur when the nextInstance # is the first thing we come across. # found = True else: i += 1 else: break if not found: # Locate the next zone to try again. # if self.searchBackwards: moved = context.goPrevious( \ flat_review.Context.ZONE, \ flat_review.Context.WRAP_LINE) self.debugContext(context, "[1] go previous") context.goEnd(flat_review.Context.ZONE) self.debugContext(context, "[1] go end") else: moved = context.goNext( \ flat_review.Context.ZONE, \ flat_review.Context.WRAP_LINE) self.debugContext(context, "[1] go next") if not moved: doneWithLine = True break else: # Locate the next line to try again. # if self.searchBackwards: moved = context.goPrevious(flat_review.Context.LINE, \ flat_review.Context.WRAP_LINE) self.debugContext(context, "[2] go previous") else: moved = context.goNext(flat_review.Context.LINE, \ flat_review.Context.WRAP_LINE) self.debugContext(context, "[2] go next") if moved: if self.searchBackwards: moved = context.goEnd(flat_review.Context.LINE) self.debugContext(context, "[2] go end") else: # Then we're at the screen's edge. # if self.windowWrap and not wrappedYet: script = orca_state.activeScript doneWithLine = False wrappedYet = True if self.searchBackwards: script.presentMessage(messages.WRAPPING_TO_BOTTOM) moved = context.goPrevious( \ flat_review.Context.LINE, \ flat_review.Context.WRAP_ALL) self.debugContext(context, "[3] go previous") else: script.presentMessage(messages.WRAPPING_TO_TOP) moved = context.goNext( \ flat_review.Context.LINE, \ flat_review.Context.WRAP_ALL) self.debugContext(context, "[3] go next") if not moved: debug.println(self.debugLevel, \ "findQuery: cannot wrap") break else: break if found: location = copy.copy(context) self.debugContext(context, "before setting original") context.setCurrent(originalLineIndex, originalZoneIndex, \ originalWordIndex, originalCharIndex) self.debugContext(context, "after setting original") if location: debug.println(self.debugLevel, \ "findQuery: returning line=%d zone=%d word=%d char=%d" \ % (location.lineIndex, location.zoneIndex, \ location.wordIndex, location.charIndex)) return location def getLastQuery(): """Grabs the last search query performed from orca_state. Returns: - A copy of the last search query, if it exists """ lastQuery = copy.copy(orca_state.searchQuery) return lastQuery
Close