08 2020 档案
摘要:1 import paramiko 2 import getpass 3 4 # 远程设备的IP 端口 用户名 密码 5 IP = "10.8.12.45" 6 port = 22 7 remote_username = "uos-0804" 8 remoet_password = "1" 9 #
阅读全文
摘要:问题:在命令行执行:python3 runner.py的时候报错,提示导入模块错误 解决: 在报错的语句前,使用sys.path.append()方法解决: import sys import os path_m = os.path.abspath("..") # 表示当前目录的上级目录 sys.p
阅读全文
摘要:# 安装rf框架 sudo pip3 install robotframework -i http://pypi.douban.com/simple --trusted-host pypi.douban.com # 安装ride sudo pip3 install robotframework-ri
阅读全文
摘要:#!/bin/bash # 获取系统sudo权限 echo "1" | sudo -S su # 方法:检查apt安装的包是否成功 function apt_check(){ dpkg -l | grep -i $1 if [ $? -eq 0 ];then echo " $1 已安装! " els
阅读全文
摘要:#!/bin/bash # 替换源 sys_list=$(head -1 /etc/apt/sources.list) new_list=$(head -1 ./sources.list) if [ ${sys_list} == ${new_list} ];then echo "源已更新!" els
阅读全文