随笔分类 -  Python学习

记录一下自己学习的Python
摘要:AutoInstallServicer.py 主程序 ConnectLinux.py 链接服务器执行命令 打包使用 auto-py-to-exe # -*- coding: utf-8 -*- # @Time : 2023/6/28 9:37 # @Author : wangyafeng # @Fi 阅读全文
posted @ 2023-06-29 17:39 王亚锋 编辑
摘要:# 调用jar包 import jpype #pip install jpype1 import os jarpath = os.path.join(os.path.abspath('.'), 'E://PycharmProjects//GUI//java//untitled.jar') #jar包 阅读全文
posted @ 2023-02-08 13:45 王亚锋 编辑
摘要:*******************工作簿对象******************* wb.active :获取第一张工作表对象 wb[sheet_name] :获取指定名称的工作表对象 wb.sheetnames :获取所有工作表名称 wb.worksheets:获取所有工作表对象,wb.wor 阅读全文
posted @ 2023-01-17 15:38 王亚锋 编辑
摘要:import PySimpleGUI as sg sg.theme('BrightColors') # 设置主题 layout = [ # 定义布局,确定行数 [sg.Text('姓名'), sg.InputText('名字')], [sg.Radio('Radio1', 'Radio', key= 阅读全文
posted @ 2023-01-05 16:51 王亚锋 编辑
摘要:#########国内源地址############## 腾讯开源镜像站 http://mirrors.cloud.tencent.com/pypi/simple豆瓣 http://pypi.douban.com/simple/网易开源镜像站 http://mirrors.163.com/搜狐开源镜 阅读全文
posted @ 2023-01-05 09:40 王亚锋 编辑
摘要:# -*- coding: utf-8 -*- # @Time : 2022/3/31 9:05 # @Author : wangyafeng # @FileName: ToLinux.py # @Email : yafengwang@dingtalk.com # @Software: PyChar 阅读全文
posted @ 2022-03-31 10:48 王亚锋 编辑
摘要:1 import os 2 import time 3 while True: 4 with open('abc1.txt', 'a+') as f: 5 result2 = str(os.popen('TASKLIST /FI "PID eq 15208"').read()) 6 f.write( 阅读全文
posted @ 2022-02-16 14:50 王亚锋 编辑
摘要:# -*- coding: utf-8 -*- # @Time : 2021/11/12 9:18 # @Author : wangyafeng # @FileName: readpdf.py # @Email : yafengwang@dingtalk.com # @Software: PyCha 阅读全文
posted @ 2021-11-12 15:46 王亚锋 编辑
摘要:#背景:公司要拿到在四环内的企业名单 企业有坐标 from matplotlib.path import Path import pymysql # 测试 db = pymysql.connect( host='192.168.0.205', user='twopro', password='ovQ 阅读全文
posted @ 2021-11-02 10:30 王亚锋 编辑
摘要:# -*- coding: utf-8 -*- # @Time : 2021/10/25 11:23 # @Author : wangyafeng # @FileName: getFileMD5.py # @Email : yafengwang@dingtalk.com # @Software: P 阅读全文
posted @ 2021-11-01 10:04 王亚锋 编辑
摘要:import hashlib def get_file_md5(file_name): """ 计算文件的md5 :param file_name: :return: """ m = hashlib.md5() #创建md5对象 with open(file_name,'rb') as fobj: 阅读全文
posted @ 2021-10-25 14:07 王亚锋 编辑
摘要:class Anmail(object): def __init__(self,name): self.name=name def talk(self): return "Anmail talking" class Dog(Anmail): def __init__(self,name,age): 阅读全文
posted @ 2018-10-18 11:02 王亚锋 编辑
摘要:1 # -*- coding: utf-8 -*- 2 # @Time : 2018/10/17 11:02 3 # @Author : wangyafeng 4 # @Email : 279949848@qq.com 5 # @Software: PyCharm 6 7 8 class Father(object): 9 def __init__(se... 阅读全文
posted @ 2018-10-18 09:49 王亚锋 编辑
摘要:1 # -*- coding: utf-8 -*- 2 # @Time : 2018/10/8 11:33 3 # @Author : wangyafeng 4 # @Email : 279949848@qq.com 5 # @Software: PyCharm 6 import psutil,so 阅读全文
posted @ 2018-10-11 09:17 王亚锋 编辑
摘要:思路一:str=‘abcd.....xyz0123456789ABCD....XYZ’ 思路二:str1='abcd...' str2='ABCD....XYZ' str3='0123456789' 思路三:引入string 使用 string.ascii_lowercase 等 思路四:引入ASC 阅读全文
posted @ 2018-10-08 16:49 王亚锋 编辑
摘要:python中对文件、文件夹(文件操作函数)的操作需要涉及到os模块和shutil模块。 得到当前工作目录,即当前Python脚本工作的目录路径: os.getcwd() 返回指定目录下的所有文件和目录名:os.listdir() 函数用来删除一个文件:os.remove() 删除多个目录:os.r 阅读全文
posted @ 2018-10-08 15:39 王亚锋 编辑

点击右上角即可分享
微信分享提示