![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
自动化解决
是你的小will
这个作者很懒,什么都没留下…
展开
-
python程序让电脑不息屏
# 导入相关库import pyautoguiimport randomimport time# 使用while True循环,让程序一直执行!while True: x = random.randint(-200,200) y = random.randint(-200,200) pyautogui.moveRel(x,y) time.sleep(5) # 让鼠标移动到某个位置,停留几秒钟代码是down来的,都能找到,为了能在其他电脑上方便的运行,还需要将.原创 2021-09-04 20:06:07 · 2149 阅读 · 2 评论 -
python使用cmd及ssh
python使用cmd主要有两种os.system和os.popen第一种无法获得返回值,第二种可以以字符串的形式获得返回值import oscmd = 'ls'os.system(cmd)import oscmd = 'ls'res = os.popen(cmd)output_str = res.read() # 获得字符串输出值print(output_str)两种方法根据情况使用。ssh主要是为了登录远程linux服务器,输入命令行并返回输出值待.原创 2021-09-04 00:01:24 · 509 阅读 · 0 评论