小编oha*_*hay的帖子

from urllib3.util.ssl_ import (ImportError: cannot import name ssl

我的资源:

Python 2.7、Ubunutu 18.04、Pycharm、虚拟框oracle

我有一个用 python 构建的自动化解决方案。该解决方案可以从两个运行cmdpycharm当然。2 个运行自动化解决方案的选项。

python main.py args a,b,c...(run 1 suite of tests)
python jenkinsRun.py arg a,b,c...(run main.py with diff args each time -lets say 5 time for instance)
Run Code Online (Sandbox Code Playgroud)

一旦jenkinsRun.py运行,它将main.py像这样执行每个:

os.system('python main.py %s %s %s %s %s %s'%(STD,config.VpcStackName, '-dryrun', 'false', '-tenant' ,config.PROD_STAGE_Tenant))
Run Code Online (Sandbox Code Playgroud)

请注意,这是我 3 年前实现它的方式......可能是更好的方法,比如 using __import__,但需要传递参数的方法等......

无论如何,运行时:

python main.py arg a,b,c..
Run Code Online (Sandbox Code Playgroud)

都好。

运行时:

jenkinsRun.py
Run Code Online (Sandbox Code Playgroud)

每次都应该使用 diff args 运行 main 我得到异常:

os.system('python main.py %s %s %s %s %s …
Run Code Online (Sandbox Code Playgroud)

python python-2.7

7
推荐指数
3
解决办法
2万
查看次数

标签 统计

python ×1

python-2.7 ×1