AutoInstallServicer.py 主程序ConnectLinux.py 链接服务器执行命令 打包使用 auto-py-to-exe# -*- coding: utf-8 -*- # @Time : 2023/6/28 9:37 # @Author : wangyafeng # @FileName: AutoInstallServicer.py # @Email : yafengw
# 调用jar包 import jpype #pip install jpype1 import os jarpath = os.path.join(os.path.abspath('.'), 'E://PycharmProjects//GUI//java//untitled.jar') #jar包
*******************工作簿对象******************* wb.active :获取第一张工作表对象 wb[sheet_name] :获取指定名称的工作表对象 wb.sheetnames :获取所有工作表名称 wb.worksheets:获取所有工作表对象,wb.wor
import PySimpleGUI as sg sg.theme('BrightColors') # 设置主题 layout = [ # 定义布局,确定行数 [sg.Text('姓名'), sg.InputText('名字')], [sg.Radio('Radio1', 'Radio', key=
#########国内源地址############## 腾讯开源镜像站 http://mirrors.cloud.tencent.com/pypi/simple豆瓣 http://pypi.douban.com/simple/网易开源镜像站 http://mirrors.163.com/搜狐开源镜
# -*- coding: utf-8 -*- # @Time : 2022/3/31 9:05 # @Author : wangyafeng # @FileName: ToLinux.py #
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(time.strftime("%Y-%m-%d %
###############################################代码1
[root@localhost pythontest]# clear[root@localhost pythontest]# pythonPython 3.6.2 (default, Dec 7 2017, 09:40:15) [GCC 4.8.5 20150623 (Red Hat 4.8.5-1
# -*- coding: utf-8 -*-# @Time : 2017/12/6 0006 9:29# @Author : wangyafeng# @Email : 279949848@.comimport requestsdef DownLoad_Image(): ''' python版本
[root@localhost pythontest]# pythonPython 3.6.2 (default, Dec 7 2017, 09:40:15) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linuxType "help", "copyrigh
# -*- coding: utf-8 -*-# @Time : 2017/12/2 0006 10:26# @Author : wangyafeng# @Email : 279949848@.comimport requestsdef get_key(response,*args,**kwar
Traceback (most recent call last): File "D:/PycharmProjects/guess.py", line 24, in <module> guess_num = int(input("请输入您猜的数字"))ValueError: invalid lite
前提:1、re 是re的主要使用方法 2、正则表达式的编写请参考《精通正则表达式》第3版'''re.match() re.match(pattern, string, flags=0) 只匹配字符串的开始,如果字符串开始不符合正则表达式,则匹配失败,函数返回None '''import reprin
# -*- coding: utf-8 -*- # @Time : 2018/1/2 0002 13:36 # @Auth
class Anmail(object): def __init__(self,name): self.name=name def talk(self): return "Anmail talking" class Dog(Anmail): def __init__(self,name,age):
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...
环境:python3.6 windows7 1、pip install pywin32 2、pip install pyinstaller 3、cmd到/python/scripts 找到pyinstaller.exe 4、pyinstaller.exe -F path:demo.py 生成路径:
#背景:公司要拿到在四环内的企业名单 企业有坐标 from matplotlib.path import Path import pymysql # 测试 db = pymysql.connect( host='192.168.0.205', user='twopro', password='ovQ
name = input("name:")age = int(input("age:"))job = input("job:")salary = int(input("salary:"))index1=''' index of %s name:%sage:%djob:%ssalary:%d'''%(
python中对文件、文件夹(文件操作函数)的操作需要涉及到os模块和shutil模块。 得到当前工作目
1 # -*- coding: utf-8 -*- 2 # @Time : 2018/10/8 11:33 3 # @Author : wangyafeng 4 # @Email : 279949848@.com 5 # @Software: PyCharm 6 import psutil,so
思路一:str=‘abcd.....xyz0123456789ABCD....XYZ’ 思路二:str1='abcd...' str2='ABCD....XYZ' str3='0123456789' 思路三:引入string 使用 string.ascii_lowercase 等 思路四:引入ASC
# -*- coding: utf-8 -*-# @Time : 2021/11/12 9:18# @Author : wangyafeng# @FileName: readpdf.py# @Email : yafengwang@dingtalk.com# @Software: PyCharm#fp = urlopen('https://www.tencent.com/zh-cn/articles
# -*- coding: utf-8 -*- # @Time : 2021/10/25 11:23 # @Author : wangyafeng # @FileName: getFileMD5.py # @Email : yafengwang@dingtalk.com # @Software: P
import hashlib def get_file_md5(file_name): """ 计算文件的md5 :param file_name: :return: """ m = hashlib.md5() #创建md5对象 with open(file_name,'rb') as fobj:
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号