python常用库、其他常用命令

文章目录

2021-10-11

  1. 常用shell命令:
    apt-get install
    apt-get uninstall
    file:cd , rm -rf *, copy src dst, cat, chmod,
    performance: proc/meminfo, vmstat, slabinfo, vmallocinfo, procrank
    cpuinfo,

  2. 常用py库

    1. random:

rand_idx = random.randint(0,len(process_list)-1)

2. time
  # device(uri).adb.cmd("root")
 sleep(5)
 cur_time_fmtstr = time.strftime("%m%d%H%M%Y",time.localtime())
 print(cur_time_fmtstr)
 shell("date %s set"%cur_time_fmtstr) #adb shell命令
 time time.time() time.strftime('%h%')
  1. xlrd load_workbook
from openpyxl import load_workbook  row ranges start with 0
1.xlwt:对xls等excel文件的写入

2.xlrd:对xls等excel文件的读取

3.openpyxl:对xlsm、xlsx等excel文件的读写

1,2比较旧了,

4. shutil



5. json 
load :
loads :
dumps :
dump:

6. os 
	执行系统命令:os.system() os.popen() os.commands() os.subprocess
	文件访问:os.path
	路径:
	net use * /del y
	net z: url /user:name pwd

7. re re.match(str, pattern)

collections
# for pre, _, node in RenderTree(self.start):
#  print("%s%s" % (pre, node.name))	

import 
	1,模块的导入需要一个叫做“路径搜索”的过程。
	2, 路径搜索:查找某个文件的操作,
	   搜索路径: 查找一组目录, 这组目录下进行路径搜索(环境变量 sys. path)
  1. adb push src dest
    adb pull src dest

    adb shell getprop |grep soc[micon|amigo]
    adb shell pm list
    adb shell am com.iauto.audio.

  2. valgirind --leak-memory,memery check,

5, dd if={} bs=4096 of={}

adb操作:
1, https://juejin.cn/post/6844903645289398280#heading-25

=以上==========

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值