
python3
花红羊蹄甲
这个作者很懒,什么都没留下…
展开
-
python3安装pip3失败
问题解决过程问题解压python的安装包到/usr/local/src/python_setup进入后make && make install装好的python3中没有pip3,安装pip3失败错误提示 zipimport.ZipImportError: can’t decompress data; zlib not available转载 2018-01-19 19:45:10 · 1514 阅读 · 0 评论 -
解决django中sqlite版本低
为什么要写这篇文章,因为我参考网上的方法没有解决了这个问题后来在一篇文章中受到启发,但它写得过于简陋django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).运行提示sqlite3版本低,先查看下sqlite3 -version3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668pyt原创 2021-08-13 10:57:01 · 924 阅读 · 0 评论 -
c python shell文件读写
linuxpythonshelllinux#include <stdio.h>//#include <sys/types.h>//#include <sys/stat.h>#include <fcntl.h> //headfile of open#include <errno.h> //headfile of errno#include <string.h>原创 2017-10-06 19:47:03 · 362 阅读 · 0 评论 -
c pythone shell获得时间
windowslinux平台pythonshell注:头文件请自行查询windowsvoid getTime() { SYSTEMTIME sys; GetLocalTime(&sys); printf("%4d-%02d-%02d %02d:%02d:%02d.%03d week:%1d\n", sys.wYear, sys.wMonth, sys.w原创 2017-10-06 19:38:49 · 326 阅读 · 0 评论 -
c python shell获得主机名和ip
windows平台linux平台pythonshell注:头文件请自己查询windows平台#pragma comment(lib,"ws2_32.lib") //for gethostname#define BUF_LEN 1024void getHostnameAndip() { int iRet = 0; WSADATA wsaData; if (iRet =原创 2017-10-06 19:34:37 · 548 阅读 · 0 评论 -
c python shell获得文件路径以及所有的文件
说明windows平台linux平台pythonshell注:头文件请自行查询说明功能:获取程序所在的目录以及该目录下所有文件windows平台void getFullPath() { wchar_t wcPath[BUF_LEN] = { 0 }; wchar_t wcDire[BUF_LEN] = { 0 }; char cPath[BUF_LEN] = {原创 2017-10-06 19:19:45 · 761 阅读 · 0 评论 -
0-01--python3 logging基本用法
#!/usr/bin/env python3# -*- coding:utf-8 -*-import loggingfrom logging.handlers import TimedRotatingFileHandlerfrom logging.handlers import RotatingFileHandler'''Formatter说明%(name)s ...原创 2020-03-29 18:22:58 · 161 阅读 · 0 评论 -
0-03--python3 configparser更新配置文件内容
#!/usr/bin/env python3# -*- coding:utf-8 -*-#################################################### Created : 2020-03-29 15:44:09# Author : zijing (zijing412@163.com)################################...原创 2020-03-29 16:45:09 · 1082 阅读 · 0 评论 -
0-02--python3 configparser加载配置内容-带默认配置
文章目录配置文件调整配置文件调整请看以下配置文件[mysqld1]user = mysqlport = 3306expire_logs_days = 7[mysqld2]user = mysqlport = 3307expire_logs_days = 7[mysqld3]user = mysqlport = 3308expire_logs_days = 14我...原创 2020-03-29 16:09:39 · 229 阅读 · 0 评论 -
0-01--python3 优雅地使用 configparser加载配置内容-无默认配置
文章目录普通加载用try用items--推荐普通加载test.cfg文件中内容如下[mysqld]user = mysqlport = 3306加载配置文件中的port变量import configparserdef load_from_filepath(): ''' 这个方法最简单异懂 第1, 判断mysqld这个域在不在 第2, 判断my...原创 2020-03-29 15:16:48 · 383 阅读 · 0 评论