码迷,mamicode.com
首页 >  
搜索关键字:python3 datetime    ( 17497个结果)
centos7 python3.5中引入sqlite3
在centos系统中创建Django app,报错如下: django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No ...
分类:数据库   时间:2016-12-11 15:11:16    阅读次数:364
关于datatime 时间处理模块:
import time from datetime import datetime from datetime import timedelta aHour=timedelta(hours=-8) Now = datetime.now() now=Now+aHour print 'now=',now ...
分类:其他好文   时间:2016-12-11 12:57:10    阅读次数:141
python datetime模块参数详解
Python提供了多个内置模块用于操作日期时间,像calendar,time,datetime。time模块,它提供 的接口与C标准库time.h基本一致。相比于time模块,datetime模块的接口则更直观、更容易调用。 datetime模块定义了两个常量:datetime.MINYEAR和da ...
分类:编程语言   时间:2016-12-11 12:49:01    阅读次数:216
python3 生成器&迭代器
#Author by Andy#_*_ coding:utf-8 _*_import timefrom collections import Iterable#列表生成式def func(): list=[] for i in range(10000000): list.append(i) prin ...
分类:编程语言   时间:2016-12-11 12:27:29    阅读次数:233
python datetime模块用strftime 格式化时间
1 2 3 #!usr/bin/python import datetime datetime.datetime.now() #!usr/bin/python import datetime datetime.datetime.now() 这个会返回 microsecond。因此这个是我们不需要的。 ...
分类:编程语言   时间:2016-12-11 12:22:03    阅读次数:300
cisco路由器上的DHCP
一、实验拓扑二、具体配置Router(config)#do sh runBuilding configuration... Current configuration : 604 bytes!version 12.4no service timestamps log datetime msecno ... ...
分类:系统相关   时间:2016-12-11 08:31:13    阅读次数:211
Cisco路由器配置ADSL上网
cisco1841#sh run Building configuration... Current configuration : 2970 bytes ! version 12.4 service timestamps debug datetime msec service timestamps... ...
分类:系统相关   时间:2016-12-11 08:27:27    阅读次数:336
python3-递归
# Auther: Aaron Fan"""递归特性:1. 必须有一个明确的结束条件2. 每次进入更深一层递归时,问题规模相比上次递归都应有所减少3. 递归效率不高,递归层次过多会导致栈溢出(在计算机中,函数调用是通过栈(stack)这种数据结构实现的,每当进入一个函数调用,栈就会加一层栈帧, 每当 ...
分类:编程语言   时间:2016-12-11 08:02:16    阅读次数:175
python3--装饰器高级学习版
__author__ = "Aaron Fan"import time #导入time模块user,passwd = 'alex','abc123' #用户名密码def auth(auth_type): #创建auth函数,创建auth_type形参 #print("auth func:",auth ...
分类:编程语言   时间:2016-12-11 07:48:44    阅读次数:217
python3-装饰器
# Author: Aaron Fan"""装饰器(别名:语法糖):定义: 本质是函数(装饰其它函数),就是为其它函数添加一些附件的功能原则: 1、不能修改被装饰的函数的源代码 2、不能修改被装饰的函数的调用方式 3、装饰器存在对被装饰的函数是完全透明的(就是被装饰的函数完全感觉不到装饰器的存在)实 ...
分类:编程语言   时间:2016-12-11 07:45:05    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!