摘要: vue,组件化 阅读全文
posted @ 2019-03-25 19:32 kevin.l 阅读(5368) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-07-08 02:19 kevin.l 阅读(2) 评论(0) 推荐(0) 编辑
摘要: // 音频拼接 ffmpeg -i "concat:first.mp3|second.mp3" -acodec copy third.mp3 (third格式和first保持一致) // 音频拼接 ffmpeg -i "concat:first.mp3|second.mp3" -i second.m 阅读全文
posted @ 2021-03-28 20:11 kevin.l 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Popen类 subprocess模块中定义了一个Popen类,通过它可以来创建进程,并与其进行复杂的交互。查看一下它的构造函数: __init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, stderr=Non 阅读全文
posted @ 2021-03-28 19:21 kevin.l 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 1. os.name——name顾名思义就是'名字',这里的名字是指操作系统的名字,主要作用是判断目前正在使用的平台,并给出操作系统的名字,如Windows 返回 'nt'; Linux 返回'posix'。注意该命令不带括号。 2. os.getcwd()——全称应该是'get current w 阅读全文
posted @ 2021-03-28 02:09 kevin.l 阅读(132) 评论(0) 推荐(0) 编辑
摘要: dir(<className>):查看类的所有方法和属性 阅读全文
posted @ 2021-03-26 12:09 kevin.l 阅读(38) 评论(0) 推荐(0) 编辑
摘要: import ast str1 = "['name','age','tall']" str2 = "('name','age','tall')" str3 = "{'name':'lucy','age':20}" list1 = ast.literal_eval(str1) tuple1 = ast 阅读全文
posted @ 2021-03-01 10:32 kevin.l 阅读(548) 评论(0) 推荐(0) 编辑
摘要: from functools import reduce list1 = [13, 22, 42, 33, 57, 32, 56, 37] tuple1 = (13, 22, 42, 33, 57, 32, 56, 37) tuple2 = (2,) list2 = [{'a': 10, 'b': 阅读全文
posted @ 2021-02-25 20:33 kevin.l 阅读(111) 评论(0) 推荐(0) 编辑
摘要: # 建议所有的界面更新动作都放在主线程中,否则textEdit控件可能会出现程序崩溃的问题 from PySide2.QtWidgets import QApplication from PySide2.QtUiTools import QUiLoader from PySide2.QtCore i 阅读全文
posted @ 2021-02-24 14:21 kevin.l 阅读(764) 评论(0) 推荐(0) 编辑
摘要: # 协程 import time import gevent from gevent import monkey # 猴子补丁 monkey.patch_all() def a(): for i in range(5): print('A', str(i)) # 猴子补丁 中 如果需要睡眠效果,必须 阅读全文
posted @ 2021-02-24 02:53 kevin.l 阅读(37) 评论(0) 推荐(0) 编辑
摘要: from multiprocessing import Process process = Process(target=函数,name=进程的名字,args=(给函数传递的参数)) process.start() 启动进程并执行任务 process.run() 只是执行了任务但是没有启动进程 pr 阅读全文
posted @ 2021-02-24 01:56 kevin.l 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 正则表达式: re 模块 import re re.match(pattern,str): 从左边开始匹配,只要匹配失败,就退出 re.search(pattern,str): 从左边开始匹配,如果匹配到第一个,则不再继续匹配 re.findall(pattern,str): 从左边开始匹配,直到匹 阅读全文
posted @ 2021-02-23 10:54 kevin.l 阅读(65) 评论(0) 推荐(0) 编辑