profile.py
来自「yahoo api,包括各版本的」· Python 代码 · 共 20 行
PY
20 行
#!/usr/bin/pythonfrom yahoo.search import webservicesfrom yahoo.search.debug import DEBUG_LEVELSimport hotshotdef tester(): x = webservices.create_search("web", "YahooDemo", query="leif hedstrom", results=20) srch = x.parse_results()if __name__ == "__main__": prof = hotshot.Profile("ysearch.prof", lineevents=1) prof.runcall(tester) prof.close() print "Convert this to a kcachegrind callstack with:" print "hotshot2calltree -o ysearch.out ysearch.prof"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?