当前位置: 首页>>代码示例>>Python>>正文


Python testing.say函数代码示例

本文整理汇总了Python中testing.say函数的典型用法代码示例。如果您正苦于以下问题:Python say函数的具体用法?Python say怎么用?Python say使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了say函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_mixed

def make_mixed():
    try:
        box.on = 'mixed'
    except ValueError:
        e = sys.exc_info()[1]
        say(e)
    report()
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:7,代码来源:05-checkbox.py

示例2: select

 def select():
     i = group.value
     name = cursor_names[i]
     say("Selecting cursor no. %d (%s)" % (i, name))
     cursor = getattr(StdCursors, name)
     say("...", cursor)
     view.cursor = cursor
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:7,代码来源:28-std-cursors.py

示例3: do_old_files

 def do_old_files(self):
     say("Doing request_old_files")
     if self.filt.on:
         file_types = [self.file_type]
     else:
         file_types = None
     result = FileDialogs.request_old_files("Open Dusty Old Files:",
         default_dir = last_dir, file_types = file_types)
     self.save_result(result)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:9,代码来源:19-file_dialogs.py

示例4: do_new_file

 def do_new_file(self):
     say("Doing request_new_file with default_dir = %s, default_name = %r"
         % (last_dir, last_name))
     if self.filt.on:
         file_type = self.file_type
     else:
         file_type = None
     result = FileDialogs.request_new_file("Save Shiny New File:",
         default_dir = last_dir, default_name = last_name, file_type = file_type)
     self.save_result(result)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:10,代码来源:19-file_dialogs.py

示例5: main

def main():
    get_test_names()
    while 1:
        list_tests()
        name = get_test()
        print
        # cmd = r"c:\python25\python %s" % name
        cmd = "%s %s" % (sys.executable, name)
        say("Executing:", repr(cmd))
        os.system(cmd)
开发者ID:rceballos98,项目名称:hapticJacket,代码行数:10,代码来源:test_launcher.py

示例6: get_test

def get_test():
    while 1:
        prefix = ask("Test? ")
        if not prefix:
            sys.exit(0)
        matches = glob("%s-*.py" % prefix)
        if not matches:
            say("Unknown test")
            continue
        if len(matches) > 1:
            say("Ambiguous")
            continue
        return matches[0]
开发者ID:rceballos98,项目名称:hapticJacket,代码行数:13,代码来源:test_launcher.py

示例7: modal_dialog

def modal_dialog():
    #global dlog ###
    dlog = ModalDialog(title = "Spanish Inquisition", size = (200, 140))
    dlog.place(Label(text = "Surprise!!!"), left = 20, top = 20)
    field = TextField()
    dlog.place(field, left = 20, top = 60, right = -20)
    field.become_target()
    dlog.default_button = DefaultButton()
    dlog.cancel_button = CancelButton()
    dlog.place(dlog.default_button, right = -20, bottom = -20)
    dlog.place(dlog.cancel_button, left = 20, bottom = -20)
    dlog.center()
    result = dlog.present()
    say("Result =", result)
    dlog.destroy()
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:15,代码来源:16-modal_dialog.py

示例8: mouse_down

 def mouse_down(self, event):
     say("Mouse down:", event.position)
     for event in self.track_mouse():
         if event.kind == 'mouse_drag':
             say("Mouse drag:", event.position)
         elif event.kind == 'mouse_up':
             say("Mouse up:", event.position)
         else:
             say("Other event:", event.kind)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:9,代码来源:TestInput.py

示例9: draw

 def draw(self, c, r):
     if self.report_update_rect:
         say("Update rect =", r)
     viewed_rect = self.viewed_rect()
     c.fillcolor = white
     c.fill_rect(viewed_rect)
     c.pensize = 6
     c.fillcolor = red
     x = 20
     y = 10
     for i in range(0, 20):
         c.newpath()
         c.moveto(x - 20, y + 20)
         c.rlineto(80, -20)
         c.rlineto(-40, 60)
         c.closepath()
         c.fill()
         c.stroke()
         x += 80
         y += 80
     ew, eh = self.extent
     c.frame_rect((0, 0, ew, eh))
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:22,代码来源:TestScrollableViews.py

示例10: save_result

 def save_result(self, result):
     if isinstance(result, list):
         say("Result:")
         for item in result:
             say("   ", item)
     else:
         say("Result =", result)
     print
     global last_dir, last_name
     if result:
         if isinstance(result, FileRef):
             last_dir = result.dir
             last_name = result.name
         elif isinstance(result, DirRef):
             say("Setting last_dir to", result) ###
             last_dir = result
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:16,代码来源:19-file_dialogs.py

示例11: show_text

def show_text(win):
    fields = [win.tf1, win.tf2, win.tf3]
    n = None
    t = application().target
    for i, f in enumerate(fields):
        say("Field %d:" % (i + 1), repr(f.text))
        if f is t:
            n = i + 1
    if n:
        say("Focus: Field %d: Selection = %r" % (n, t.selection))
    else:
        say("No focus")
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:12,代码来源:09-textfield.py

示例12: key_down

 def key_down(self, event):
     say("char = %r key = %r unichars = %r _keycode = 0x%04x" % (
         event.char, event.key, event.unichars, event._keycode))
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:3,代码来源:38-keys.py

示例13: bing

 def bing():
     say("Bing!")
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:23-shrink_wrap.py

示例14: key_up

 def key_up(self, event):
     say("Key up: %s\n" % event)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:01-application.py

示例15: auto_key

 def auto_key(self, event):
     say("Auto key: %s\n" % event)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:01-application.py


注:本文中的testing.say函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。