• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python testing.say函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: say_goodbye

def say_goodbye():
  say("Goodbye, world!")
  btn2.enabled = 0
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:3,代码来源:04-button.py


示例17: key_down

 def key_down(self, event):
     say("Key down: %s\n" % event)
     if event.char == "E":
         raise Exception("This is a test exception.")
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:4,代码来源:01-application.py


示例18: targeted

 def targeted(self):
     say("%s targeted" % self.name)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:26-targeting.py


示例19: mouse_drag

 def mouse_drag(self, event):
     say(self.name, "Mouse drag:", event)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:02-window.py


示例20: mouse_down

 def mouse_down(self, event):
     say(self.name, "Mouse down:", event)
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:2,代码来源:02-window.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python testing.setup_mesh_modifier_test函数代码示例发布时间:2022-05-27
下一篇:
Python testing.run函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap