随笔分类 -  python

上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 48 下一页
摘要:#coding=utf-8 import json data ={"update_time":"12982929921","version":"0.0.0","desc":{"hdw":{"desc":{"power":"1.0.0","motor":"1.0.0","imu":"1.0.0","sensor":&qu 阅读全文
posted @ 2019-05-15 17:54 anobscureretreat 阅读(194) 评论(0) 推荐(0)
摘要:判断路径或文件os.path.isabs(...) # 判断是否绝对路径os.path.exists(...) # 判断是否真实存在os.path.isdir(...) # 判断是否是个目录os.path.isfile(...) # 判断是否是个文件 路径名、文件名分隔os.path.split(. 阅读全文
posted @ 2019-05-14 10:07 anobscureretreat 阅读(361) 评论(0) 推荐(0)
摘要:mkdir fff dddtouch ddd/test.py ddd/__init__.py sudo vi fff/te.py写入:import syssys.path.append('../')from ddd import test cd fffpython te.py 阅读全文
posted @ 2019-05-13 10:24 anobscureretreat 阅读(171) 评论(0) 推荐(0)
摘要:第一种wget https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gztar vxzf si 阅读全文
posted @ 2019-05-13 10:22 anobscureretreat 阅读(1036) 评论(0) 推荐(0)
摘要:解决方法: 在Python程序最前面加上以下语句: 阅读全文
posted @ 2019-05-09 00:01 anobscureretreat 阅读(2326) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-05-08 22:19 anobscureretreat 阅读(311) 评论(0) 推荐(0)
摘要:brew install nmap 阅读全文
posted @ 2019-05-06 12:55 anobscureretreat 阅读(1894) 评论(0) 推荐(0)
摘要:#coding = utf-8 import os,os.path import threading import time lock = threading.RLock() def action(ip): result = "ip.txt" return1 = os.system('ping -n 2 -w 1 %s' % ip) # 每个ip ping2次,等待时间为... 阅读全文
posted @ 2019-05-06 12:50 anobscureretreat 阅读(321) 评论(0) 推荐(0)
摘要:import math def deal(yaw): if(yaw<0): print(-(abs(yaw)/math.pi)*180) print(math.degrees(yaw)) else: print((abs(yaw)/math.pi)*180) ... 阅读全文
posted @ 2019-05-06 11:12 anobscureretreat 阅读(791) 评论(0) 推荐(0)
摘要:下载:https://www.python.org/downloads/release/python-2716/ 安装即可。 设置环境变量 进入C:\Python27,修改python.exe 为python2.exe 在命令行输入: 显示python3, 再次输入 显示python2.7 参考: 阅读全文
posted @ 2019-05-04 14:43 anobscureretreat 阅读(4123) 评论(0) 推荐(0)
摘要:python在编写排列组合是会用到 itertools 模块 排列 组合 可以重复的排序(类似密码) 利用生成器可以跌代的生产密码,节约内存 阅读全文
posted @ 2019-05-03 14:32 anobscureretreat 阅读(1926) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-05-03 14:28 anobscureretreat 阅读(1387) 评论(0) 推荐(0)
摘要:os.system("系统命令") 调用系统命令 os.listdir(地址) 扫描目录里面的文件。默认的是当前文件夹 返回一个列表 os.mkdir(路径) 创建一个文件夹 os.popen (系统命令) 方法用于从一个命令打开一个管道 os常用 的几个方法 阅读全文
posted @ 2019-05-03 14:24 anobscureretreat 阅读(196) 评论(0) 推荐(0)
摘要:import win32con import win32api import time win32api.SetCursorPos([30,30]) # 设置鼠标位置 time.sleep(0.1) #win32con.MOUSEEVENTF_RIGHTDOWN 右边鼠标按下 #win32con.MOUSEEVENTF_RIGHTDUP 右边鼠标抬起 #win32con.MOUSEEVE... 阅读全文
posted @ 2019-05-03 14:12 anobscureretreat 阅读(460) 评论(0) 推荐(0)
摘要:pattern = input("请输入你要选择的模式:") while True: if pattern == "A": row = eval(input("请输入行数:")) for i in range(1, row + 1): for j in range(1, i+1): print(j... 阅读全文
posted @ 2019-05-03 13:56 anobscureretreat 阅读(2880) 评论(0) 推荐(0)
摘要:code 阅读全文
posted @ 2019-05-03 13:52 anobscureretreat 阅读(492) 评论(0) 推荐(0)
摘要:显示 阅读全文
posted @ 2019-05-03 13:48 anobscureretreat 阅读(1997) 评论(0) 推荐(0)
摘要:code 阅读全文
posted @ 2019-05-03 13:39 anobscureretreat 阅读(1721) 评论(0) 推荐(0)
摘要:code 阅读全文
posted @ 2019-05-03 13:36 anobscureretreat 阅读(2220) 评论(0) 推荐(1)
摘要:code 阅读全文
posted @ 2019-05-03 13:34 anobscureretreat 阅读(4923) 评论(0) 推荐(0)

上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 48 下一页