
python学习
追梦-北极星
公众号:茶色光阴
有想要的资料可以找我
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python xml read write operate
https://stackabuse.com/reading-and-writing-xml-files-in-python/ https://docs.python.org/3/library/xml.etree.elementtree.html原创 2020-02-24 20:27:05 · 189 阅读 · 0 评论 -
centos 更换python版本从3.5到3.7出现的问题
1、ModuleNotFoundError: No module named '_ctypes' yum install libffi-devel tk-devel 后重新安装python3.7 ./configure 检查编译环境/相关库文件/配置参数,生成makefile make 对源代码进行编译,生成可执行文件 make install 将生成的可执行文件安装到当前...原创 2020-03-25 11:54:57 · 618 阅读 · 0 评论 -
ubuntu写的python,移到cenos出现的环境问题记录
1、pip问题 pip命令:查看各种python安装的包 https://blog.youkuaiyun.com/sinat_33718563/article/details/90322609 https://gitpython.readthedocs.io/en/stable/intro.html#getting-started https://github.com/gitpython-develo...原创 2020-03-03 14:29:39 · 356 阅读 · 0 评论 -
python获取到的html数值带b',如何去掉
https://stackoverflow.com/questions/41918836/how-do-i-get-rid-of-the-b-prefix-in-a-string-in-python b = b'1234' print(b.decode('utf-8')) # '1234'原创 2020-03-03 14:25:04 · 3056 阅读 · 0 评论 -
python自定义print准备ing
https://www.jianshu.com/p/c535704938eb原创 2020-02-26 20:10:20 · 685 阅读 · 0 评论 -
python:IndentationError:expected an indented block
1、正常情况下是加一个缩进就行了 2、我这让在调试的时候出现一个特殊情况: 如下错误:60行需要一个缩进,看下图第二个代码,我这儿明明不需要再缩进,因为不是for循环里的,但是却提示需要一个缩进 File "test_jacoco_report.py", line 60 diffTree = ET.ElementTree(diffRoot) ^ Inden...原创 2020-02-25 17:46:10 · 452 阅读 · 0 评论 -
python分离文件路径、文件名、和文件名后缀
1 #!/usr/bin/python 2 3 import os 4 5 file_path = "/home/jenkins/test/state.java" 6 (filepath, tempfilename) = os.path.split(file_path) 7 (filename, extension) = os.path.splitext(temp...原创 2020-02-25 17:08:30 · 748 阅读 · 0 评论