本文整理汇总了Python中SearchDialogBase.SearchDialogBase.open方法的典型用法代码示例。如果您正苦于以下问题:Python SearchDialogBase.open方法的具体用法?Python SearchDialogBase.open怎么用?Python SearchDialogBase.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchDialogBase.SearchDialogBase
的用法示例。
在下文中一共展示了SearchDialogBase.open方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: from SearchDialogBase import SearchDialogBase [as 别名]
# 或者: from SearchDialogBase.SearchDialogBase import open [as 别名]
def open(self, io=None):
SearchDialogBase.open(self, None)
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: open
# 需要导入模块: from SearchDialogBase import SearchDialogBase [as 别名]
# 或者: from SearchDialogBase.SearchDialogBase import open [as 别名]
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
示例3:
# 需要导入模块: from SearchDialogBase import SearchDialogBase [as 别名]
# 或者: from SearchDialogBase.SearchDialogBase import open [as 别名]
import string