python
youcharming
这个作者很懒,什么都没留下…
展开
-
python获取毫秒级别时间差以评估rpc call time cost
评估 rpc call 花费的时间,要细化到ms 级别原创 2022-08-12 09:38:51 · 484 阅读 · 1 评论 -
如何用avacodo框架运行robot framework的case
1. as we knowavacodo is designed for pytest natively, but it can run robot frawork test cases by intall the plugin avocado-framework-plugin-robotbelow example arecan be run on (avocado-framework 90.0 and avocado-framework-plugin-robot 90.0)examle cas...原创 2021-11-12 14:15:00 · 889 阅读 · 0 评论 -
python print 中文显示\xe3\x80
pythonPython 2.7.5 (default, Apr 2 2020, 13:16:51)[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> uri="2003Theme_ListFAW.robot:2003Theme ListFAW.BSSOSS-6931 【EZIA-CO..原创 2021-11-11 13:47:14 · 2069 阅读 · 0 评论 -
Robot framework tool collection by 2021
1.Tool for static code analysis forRobot framework codeGitHub - MarketSquare/robotframework-robocop: Tool for static code analysis of Robot Framework language原创 2021-10-28 19:06:37 · 153 阅读 · 0 评论 -
conda 4.9 python3.8.5 支持tensorflow2.4
这里写自定义目录标题packages in environment at /opt/anaconda320/anaconda3/envs/tensf:Name Version Build Channel(tensf) admins-MacBook-Pro-4:homebrew aa77y2g$ conda listpackages in environment at /opt/anaconda320/anaconda3/envs原创 2020-12-19 11:12:28 · 1572 阅读 · 1 评论 -
打印出漂亮的json use python command python -m json.tool
[jenkins@hzNgJenkins robot-plugin]$ cat result.json [[{"elapsed":"00:07:33","fail":1,"label":"Critical Tests","pass":1},{"elapsed":"00:07:33","fail":1,"label":"All Tests","pass":1}],[],[{"elapsed":原创 2017-06-16 16:17:27 · 2925 阅读 · 0 评论 -
python print 打印unicode string的时候 去掉u' remove u'
1. 对list型的 用join 方法,是可以的实现的2. 对json data 型的数据,用json.dump 方法, 是可以的实现的3.对于单个string 串,可以用replace原创 2016-03-14 15:32:21 · 27838 阅读 · 0 评论 -
pip install 安装指定版本的包
要用 pip 安装特定版本的 Python 包,只需通过 == 操作符 指定,例如:pip install robotframework==2.8.7将安装robotframework 2.8.7 版本。原创 2016-04-06 13:03:43 · 310844 阅读 · 2 评论 -
python 对入参文本进行预处理成以一个空格为间隔的一维数组
#!/usr/bin/pythonimport redef pre_process_msg ( msgIn ): if msgIn=="": return "msgIn_Input_Error,should'nt Null, it is Strings" else: #1 trim msg = msgIn原创 2015-06-06 20:41:43 · 3437 阅读 · 0 评论 -
python 将命令行执行的屏幕输出赋值到out变量
1.捕获屏幕输出(因为后续要保存到log中)2.得到执行shell程序的返回值使用了subprocess来调用shell程序,需要从屏幕看到工具的输出,并捕获这些输出(后续需要保存),run_watch=subprocess.Popen('dir',shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)ou原创 2015-06-06 19:56:27 · 12020 阅读 · 0 评论 -
python 正则字符串替换 re.sub 替换输入参数字符串inStrings 所有的一个或多个空格替换为newstring
python 正则字符串替换 re.sub 替换输入参数字符串inStrings 所有的一个或多个空格替换为newstring原创 2015-06-06 15:34:00 · 5230 阅读 · 0 评论 -
python change the unittest execution order, default testcase in class run in alphabetical order
import unittestclass TestStringMethodsClass(unittest.TestCase): @classmethod def setUpClass(cls): print 'setup in TestStringMethods class' pass @classmet原创 2015-05-06 10:10:35 · 920 阅读 · 0 评论 -
安装robotframewrok 的ssh库 pip install robotframework-sshlibrary 遇到 error: Unable to find vcvarsall.bat
安装robotframewrok 的ssh库 遇到 error: Unable to find vcvarsall.bat原创 2015-03-05 15:03:48 · 6388 阅读 · 0 评论 -
Python正则表达式指南 转自AstralWind
Python正则表达式指南转自 http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html 本文介绍了Python对于正则表达式的支持,包括正则表达式基础以及Python正则表达式标准库的完整介绍及使用示例。本文的内容不包括如何编写高效的正则表达式、如何优化正则表达式,这些主题请查看其他教程。注意转载 2014-12-09 09:52:15 · 522 阅读 · 0 评论