python
文章平均质量分 61
firefaith
这个作者很懒,什么都没留下…
展开
-
Python 定时重试
from func_timeout import func_set_timeout from func_timeout.exceptions import FunctionTimedOut import time from retrying import retry import functools #===============测试1===================== # 超时时间设为2秒,2秒后自动结束 @func_set_timeout(2) def f1(): print("f1.原创 2021-05-14 07:49:51 · 185 阅读 · 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 · 380 阅读 · 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 · 428 阅读 · 0 评论 -
python table打印为pdf
# -*- coding=utf-8 -*- # 使用reportlab,注册中文字体 import sys reload(sys) sys.setdefaultencoding('utf8') from reportlab.lib import colors from reportlab.lib.pagesizes import A4, landscape from reportlab.pl原创 2018-01-04 15:44:46 · 1206 阅读 · 0 评论 -
Flask Sql通过参数创建表
# Integer,Float,String,DateTime def getColumnObject(dbColumnDict): ctype = dbColumnDict["type"] isIdx = dbColumnDict["index"] if ctype == "String": n = dbColumnDict["length"]原创 2018-01-08 14:26:09 · 509 阅读 · 0 评论