
python
结合工作需要,定其增加一些办公小工具,如pythony调用excel,word;在办公中自已写的一些小工具,一些代码,用python解决工作时的思咱及实验代码,或者有工作需求的一些小工具,如上次帮别人整的财务评级用小工具代码
信息化未来
Python爱好者odoo
展开
-
gitblit git pycharm 新建版本库及push备忘
gitblit git pycharm 新建版本库及push备忘,在终端l中输入ssh,如果有消息弹出说明安装成功。原创 2024-06-18 21:47:52 · 1010 阅读 · 0 评论 -
git 错误 no matching host key type found. Their offer: ssh-rsa,ssh-dssfatal: Could not read from rem
解决方法:修改C:\Program Files\Git\etc\ssh下ssh_config文件未尾增加:顺利解决。原创 2024-06-18 21:20:53 · 424 阅读 · 0 评论 -
shutil.copyfile PermissionError: [Errno 13] Permission denied
File "G:/od15/调试/翻译文件更换/更新翻译po文件.py", line 42, in 出现以上错误,主要是copyfile()的参数为文件夹引起,更换成文件就可以了。原创 2023-03-06 21:46:17 · 1428 阅读 · 0 评论 -
python 微信好友 群发新春祝贺词试验失败
先来段简单的试用,实现微信的登录,运行下面代码会生成一个二维码,扫码之后手机端确认登录,就会发送一条信息给‘filehelper’,这个。如今微信已经成为了个人社交的很大一部分,希望这个项目能够帮助你扩展你的个人的微信号、方便自己的生活。itchat是一个开源的微信个人号接口,使用python调用微信从未如此简单。返回完整的好友列表,每个好友为一个字典, 其中第一项为本人的账号信息,传入。当然,该api的使用远不止一个机器人,更多的功能等着你来发现,比如。键值的用户. (可以与下一项配置使用.)原创 2023-01-09 21:29:49 · 1016 阅读 · 0 评论 -
python 中药归经整理,字符串处理
肝,胃经’, ‘gjtag’: [(6, 0, [2, 4, 6, 50, 1, 5])]}脾,胃经’, ‘gjtag’: [(6, 0, [1, 2, 53, 4, 5])]}胃,膀胱经’, ‘gjtag’: [(6, 0, [6, 45, 5, 3])]}胃,肝经’, ‘gjtag’: [(6, 0, [4, 39, 5, 1])]}{‘GuiJing’: ‘脾,胃经’, ‘gjtag’: [(6, 0, [53, 4, 5])]}[‘胃肝’, ‘胃膀胱’, ‘肝胃’, ‘脾胃’, ‘肠胃’]原创 2022-12-29 09:48:48 · 2078 阅读 · 0 评论 -
python odoo 电子书设计
python odoo 电子书设计。原创 2022-12-27 20:33:16 · 181 阅读 · 0 评论 -
python 性味归经函数,字符串分隔
python 性味归经函数,字符串分隔。取有某个特定字符串的前几位与后几位数据。[‘肺,心’, ‘肾’][‘肺,心’, ‘肾’]原创 2022-12-26 20:48:55 · 124 阅读 · 0 评论 -
python字符串find方法,python findall函数用法
find() 方法检测字符串中是否包含子字符串 str ,如果指定 beg(开始) 和 end(结束) 范围,则检查是否包含在指定范围内,如果包含子字符串返回开始的索引值,否则返回-1。1、在字符串中找到正则表达式所匹配的所有子串,并返回一个列表,如果没有找到匹配的,则返回空列表。Endpos :可选参数,指定字符串的结束位置。Pos :可选参数,指定字符串的起始位置。end:可选参数,结束索引,默认为字符串长度。如果包含子字符串返回开始的索引值,否则返回-1。start:可选参数,开始索引,默认为0。原创 2022-12-25 12:53:29 · 1800 阅读 · 0 评论 -
迎新年倒计时python代码(带背景及背景音乐)
马上就要到2023年了,于是用python语言写了一个跨年倒计时代码,附代码效果截图,祝大家在新的一年里:所念的人平安喜乐,所想的事顺心如意,同时添加了一段爱你千百回的背景音乐,你也可以换上个好的背景图片,这个页面配上音乐才有新年的气氛。原创 2022-12-17 19:04:01 · 2314 阅读 · 10 评论 -
小学生python游戏编程arcade----时间问题及敌人角色自动发射炮弹
接上篇文章继续解绍arcade游戏编程的基本知识。游戏中的时间概念很重要,下面能过一个小时钟例子及敌人角色自动发射炮弹为例进一步加深其时间印象。1.2 时间获取及格式输出1.3 效果图2、子弹的自动发射2.1计䉤器2.2 定期发射2.3 效果图源码获取可关注博主后,私聊博主免费获取需要技术指导,育娃新思考,企业软件合作等更多服务请联系博主今天是以此模板持续更新此育儿专栏的第 41/50次。可以关注我,点赞我、评论我、收藏我啦。原创 2022-12-04 08:44:17 · 1112 阅读 · 0 评论 -
小学生学python --python环境搭建(包括正常,专业,学生版)
小学生学python --python环境搭建。原创 2022-08-18 22:44:42 · 1151 阅读 · 0 评论 -
python 实验室定时关闭到时显示器
python 实验室定时关闭到时显示器from ctypes import *import timefrom ctypes.wintypes import *HWND_BROADCAST = 0xffffWM_SYSCOMMAND = 0x0112SC_MONITORPOWER = 0xF170MonitorPowerOff = 2SW_SHOW = 5def main(): windll.user32.PostMessageW(HWND_BROADCAST, W原创 2022-05-24 22:33:08 · 516 阅读 · 0 评论 -
python 操作word 修改页眉与页脚
# -*- coding: utf-8 -*-# @Time : 2022年05月01日 19时59分# @File : doctemp.py# @notice :from docxtpl import DocxTemplatedata_dic = {'t1':'燕子','t2':'杨柳','t3':'桃花','t4':'针尖','t5':'头涔涔','t6':'泪潸潸','t7':'茫茫然','t8':'伶伶俐俐','报告日期':'2008-11-22','报告编号':'.原创 2022-04-30 21:19:58 · 2242 阅读 · 0 评论 -
python win7 appiumDesktop环境搭建
一、安装node.jsnode.js官方网站:Node.jswin7不适合,最后下了个node-v12.18.4-win7.7z,我上传到资源了,有用的可去下载,不用每个版本再浪费时间找了Appium-windows-1.18.0-2.zip_appium下载-互联网文档类资源-CSDN下载解压即可用安装成功后,在系统变量path中加上 ;启动cmd,输入 node -v,输出如下信息,则安装成功二、配置Android sdk环境...原创 2022-04-25 21:10:43 · 2055 阅读 · 0 评论 -
python Failed to build cryptography Could not build wheels for cryptography which use PEP 517
pip3 install Appium-Python-Client安装时出现以下错误:python Failed to build cryptography Could not build wheels for cryptography which use PEP 517copying src\cryptography\hazmat\bindings\_rust\x509.pyi -> build\lib.win32-cpython-37\cryptography\hazmat\bindin原创 2022-04-25 19:37:37 · 2023 阅读 · 0 评论 -
python hashlib模块--学习笔记
python hashlib模块--学习笔记目录简介:主要用途:用于用户登陆口令存储应用代码示例及原码学习import hashlibimport ospassword = "abcdefghijk".encode("utf-8")salt = os.urandom(32)print(salt)# >>b']\xd6B6\x083\x81\xf6\x8a\t\xfb\x05\xcdDI\xbd\x84y>&\x80b\x9cg\xbfwT~\xa1\x84N原创 2022-04-22 17:51:26 · 723 阅读 · 0 评论 -
python 列表,字符中不常用但重要的知识小试验(1)
目录1 list2 字符串3 字典1 listpop]=[]>>> a['常', '小', '结']>>> a.pop()'结'>>> a['常', '小']>>>高级排序,接受两个参数:key和reverse2 字符串>>> import math>>> t="The {mod.__name__} module de...原创 2022-04-21 14:35:35 · 282 阅读 · 0 评论 -
python 操作word win32com 办公自动化一
目录一、概述:python操作word方法.... 1二、Win32com安装.... 2三、基础:对Word对象模型的简单理解.... 4四、展示: 手动录宏,python自动化.... 11五、实验: 多试多感觉.... 13一、概述:python操作word方法今天由于工作需要,想在不同的word页面显示不同的页眉页脚,在网上查了一下,代码解绍python操作word的文件的确不少,但好多没有验证,试了一些,没能成功,大致分两种情况,g一种:Python原创 2022-04-15 21:19:23 · 656 阅读 · 0 评论 -
word 去除页眉默认的横线及python操作分析
word 去除页眉默认的横线1,编辑页眉,去除格式,保存,再去除页眉文件,保存,即可去除。python 去除,调用,操作word 有时实现不了功能时,可以通过录制宏,进行分析,基本上问题都可以解决。Sub 页眉目()'' 页眉目 宏' 柘城' Selection.TypeText Text:="枯模压硒鼓2检验人:"End SubSub 宏1()'' 宏1 宏'' ActiveDocument.Tables.Add Range:=Selection.Range...原创 2022-04-15 16:44:30 · 1284 阅读 · 0 评论 -
python 获取word文档页数
# -*- coding: utf-8 -*-# @Time : 2022年04月14日 13时58分# @Email : cf200908@126.com# @Author : Chenfengyi# @File : win32com-word.py# @notice :import win32comimport osimport pythoncomimport win32com.client as win32# pip install pypiwin32def get_wo.原创 2022-04-14 14:22:04 · 2755 阅读 · 0 评论 -
python excel文件换题头
最近在整理大批的excel人员数据,但因历史原因,题头写的乱七八遭,导入数据库时时常提醒,就写了个如下函数,统一下表头# 目录下所有excel换题头def muHuanTitou(path,biaotou): df = pd.read_excel(path, None) # 替换Excel 表格内的空单元格,否则在下一步处理中将会报错 import datetime str_p = datetime.datetime.now() dateTime_p = d原创 2022-04-12 08:04:45 · 1924 阅读 · 0 评论 -
python 两数组合并值重复项及几个简单re应用
数据库中人员重复了,怎么合并,试了试如下函数ryid=[1,2,3,4,5]ryname=['a','c','b','c','c']def ryqchhb(ryid,ryname): qchr=list(set(ryname)) hbry=[] for xx in qchr: chf=0 for i in range(len(ryid)): if ryname[i]==xx: chf+=1.原创 2022-04-12 08:00:53 · 689 阅读 · 0 评论 -
odoo15 讨论 中共享屏幕提示无display 访问权限
odoo15 讨论 中共享屏幕提示无display 访问权限今天试了下,讨论中的共享屏幕,用不成,提示无display 访问权限不知有哪位用过,望指教/** * @param {Object} param0 * @param {string} param0.currentSessionId the Id of the 'mail.rtc_session' of the current partner for the current call * @param.原创 2022-04-07 18:12:48 · 458 阅读 · 0 评论 -
python odoo 错误原因:raise TypeError(“cannot marshal None unless allow_none is enabled“)分析
python odoo 错误原因:raise TypeError("cannot marshal None unless allow_none is enabled")Traceback (most recent call last): File "G:/od15/数库单表转移.py", line 81, in <module> zhuan_biao(dbm, pc2) File "G:/od15/数库单表转移.py", line 65, in zhuan_biao ...原创 2022-04-02 18:14:29 · 2273 阅读 · 0 评论 -
odoo15 pandas 安装提示却少openpyxl及版本查看
odoo15 调用pandas 提示却少openpyxlpandas安装pip install pandas==1.3.5 pip install openpyxl==3.0.9查看:pandas 版本号方法import pandas as pdpd.__version__原创 2022-03-17 11:36:46 · 1601 阅读 · 0 评论 -
odoo15 python Scaffold 模板自定义
自定义odoo新模块模板原创 2022-03-04 10:22:08 · 471 阅读 · 0 评论 -
python flask 本机访问与局网内访问
当自己的第一个页面在本地电脑上面成功运行后,同室的其它机子却访问不了。第一步就像网上大部分教程说的,你需要修改最后的app.run()中的参数,加入host=‘0.0.0.0’,port=5000在这里0.0.0.0代表了自动匹配你的电脑可以和外界连接的网段,在本机测试上,host默认是127.0.0.1,而port代表了端口号,如果你不修改它,它默认就是5000,你必须保证这个端口在你计算机上的开放,关于开放端口下面会讲。1.打开搜索,找到防火墙,打开高级设置,我们要修改入站规则。2.选原创 2022-02-17 21:31:19 · 1550 阅读 · 0 评论 -
odoo 13 时间验证
Type "help", "copyright", "credits" or "license" for more information.>>> from odoo import models, fields, api>>> t=fields.Date.today()>>> tdatetime.date(2021, 12, 19)>>> t.day19>>>>>> import da原创 2021-12-19 10:16:41 · 356 阅读 · 0 评论 -
python odoo13 两时间相差天数
odoo中赋值当前日期odoo对象中字段赋值为当前日期(字符串):fields.date.context_today,fields.date.context_today(self, cr, uid, context=context),fields.date.today()odoo对象中字段赋值为当前时间(字符串):fields.datetime.now(),fields.datetime.context_timestamp(cr, uid, datetime.now(), context=contex原创 2021-12-19 09:11:31 · 968 阅读 · 0 评论 -
python pdf 文件,流转换
流存入附件:base64.encodebytes(pdfoutbuffer.getvalue()) 流加入附件文件存入附件:f = open(pdftem2, 'rb')ny = {'datas': base64.b64encode(f.read()),原创 2021-12-11 14:33:20 · 1383 阅读 · 0 评论 -
python pdf加水印,出错UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xcb in position 8: invalid cont
raceback (most recent call last): File "G:\zgxzd\venv\lib\site-packages\PyPDF2\generic.py", line 484, in readFromStream return NameObject(name.decode('utf-8'))UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 8: invalid continuat...原创 2021-12-03 19:05:06 · 922 阅读 · 0 评论 -
odoo15 安装 pip升级报错- AttributeError: ‘NoneType‘ object has no attribute ‘bytes‘
今天下了odoo15,想试一下,安装虚拟环境后,提示pip需更新pip install --upgrade pip最后查了下,也没找到什么原因看到网上用easy_install pip命令,竟成功了原创 2021-10-10 22:18:13 · 300 阅读 · 0 评论 -
微信小程序 数组更新问题
今天 试了一下微信小程序,更新后数据老是传递不对,一定注意:that.setData({username:res.data.data['name'],userpic:res.data.data['picurl']})setdata D大写,还有,直接赋值不可(that.data.username=...这种不行),多次引用show发现数值也不变,只有用setDa...原创 2021-08-25 15:51:42 · 1046 阅读 · 0 评论 -
python 错误分析 TypeError: can only concatenate str (not “float“) to str
1、(can only concatenate str (not “float”) to str 代码DeBug日志print("总价为"+money)1python中,print函数不能同时识别2种数据类型,代码中money是float类型,前面为字符串,可以单独打印print(money)但是前面加了字符串,后面的money也要变成字符串,转个类型就行print("总价为"+str(money))————————————————版权声明:本文为CSDN博主「weixin_42331原创 2021-08-08 08:32:04 · 20900 阅读 · 2 评论 -
一站式企业管理软件平台
原创 2021-07-16 20:29:01 · 170 阅读 · 0 评论 -
文字识别原码 百度api试验,识别率很高的,中文英文均可
# _*_ coding: UTF-8 _*_# 开发人员: Administrator# 开发时间:2021/7/1 22:52# 文件名称: baidusb.py# 开发工具: PyCharmimport sysimport jsonimport base64from urllib.request import urlopenfrom urllib.request import Requestfrom urllib.error import URLErrorfrom url.原创 2021-07-01 23:30:47 · 155 阅读 · 0 评论 -
python 进制转换函数 串口调试用
shilius = [str(x) for x in range(10)] + [chr(x) for x in range(ord('A'), ord('A')+6)]print(shilius)# bin2dec# 二进制 to 十进制: int(str,n=10)def bin2dec(string_num): return str(int(string_num, 2))# hex2dec# 十六进制 to 十进制def hex2dec(string_num): re.原创 2021-06-30 17:47:21 · 671 阅读 · 0 评论 -
python 人员查重用函数
ryid=[1,2,3,4,5]ryname=['a','c','b','c','c']def ryqchhb(ryid,ryname): qchr=list(set(ryname)) hbry=[] for xx in qchr: chf=0 for i in range(len(ryid)): if ryname[i]==xx: chf+=1 # print(chf) .原创 2021-05-21 21:01:50 · 531 阅读 · 0 评论 -
python 有效位数计算
def getfeiling(shus): try: for i in range(len(shus)): if int(shus[i]) > 0: return i+1 except: return 0原创 2021-05-11 12:00:26 · 509 阅读 · 0 评论 -
python 四舍六入五乘双
def getsswr(s,yyw,lx=True): fg=str(s).split('.') mw=fg[1][yyw] zf = '%.' + str(yyw) + 'f' ljgs = fg[0] + '.' + fg[1][:yyw] if lx: if mw in ['5', '6', '7', '8', '9']: zjg = float(zf % (float(ljgs)+1/math.pow(10,yyw)).原创 2021-05-10 21:49:51 · 392 阅读 · 0 评论