Пример #1
0
 def open(self, text, searchphrase, io=None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ""
     else:
         path = ""
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = ".py"
     self.globvar.set(os.path.join(dir, "*" + tail))
Пример #2
0
 def open(self, text, searchphrase, io=None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ''
     else:
         path = ''
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = '.py'
     self.globvar.set(os.path.join(dir, '*' + tail))
Пример #3
0
 def open(self, text, searchphrase, io=None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ""
     else:
         path = ""
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = ".py"
     self.globvar.set(os.path.join(dir, "*" + tail))
Пример #4
0
 def open(self, text, searchphrase, io = None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ''
     else:
         path = ''
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = '.py'
     self.globvar.set(os.path.join(dir, '*' + tail))
Пример #5
0
 def open(self, text):
     SearchDialogBase.open(self, text)
     try:
         first = text.index("sel.first")
     except TclError:
         first = None
     try:
         last = text.index("sel.last")
     except TclError:
         last = None
     first = first or text.index("insert")
     last = last or first
     self.show_hit(first, last)
     self.ok = 1
Пример #6
0
 def open(self, text):
     SearchDialogBase.open(self, text)
     try:
         first = text.index("sel.first")
     except TclError:
         first = None
     try:
         last = text.index("sel.last")
     except TclError:
         last = None
     first = first or text.index("insert")
     last = last or first
     self.show_hit(first, last)
     self.ok = 1