python
文章平均质量分 61
firefaith
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python 定时重试
from func_timeout import func_set_timeoutfrom func_timeout.exceptions import FunctionTimedOutimport timefrom retrying import retryimport functools#===============测试1=====================# 超时时间设为2秒,2秒后自动结束@func_set_timeout(2)def f1(): print("f1.原创 2021-05-14 07:49:51 · 269 阅读 · 0 评论 -
Python入门
安装一般linux系统默认都安装python,在终端键入python检查是否已经安装成功,若没有,用yum安装。 yum install python27 python27-develhelloworld脚本键入python,可以在python的shell下运行print "hello world",也可以通过python脚步运行。vim helloworld.py#! /usr/bin/pyth原创 2015-04-14 15:53:12 · 438 阅读 · 0 评论 -
The Zen of Python
在python shell中,输入import this,会显示The Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat转载 2015-04-16 14:24:04 · 480 阅读 · 0 评论 -
python table打印为pdf
# -*- coding=utf-8 -*-# 使用reportlab,注册中文字体import sysreload(sys)sys.setdefaultencoding('utf8')from reportlab.lib import colorsfrom reportlab.lib.pagesizes import A4, landscapefrom reportlab.pl原创 2018-01-04 15:44:46 · 1270 阅读 · 0 评论 -
Flask Sql通过参数创建表
# Integer,Float,String,DateTimedef getColumnObject(dbColumnDict): ctype = dbColumnDict["type"] isIdx = dbColumnDict["index"] if ctype == "String": n = dbColumnDict["length"]原创 2018-01-08 14:26:09 · 566 阅读 · 0 评论
分享