随笔分类 - python
摘要:!/usr/bin/env python coding:utf 8 计算结果百位500向下取整,(0 499取000,500 999取500) import math calc_Amount = float(input("输入所有可需金额:")) act_Amount = calc_Amount i
阅读全文
摘要:1.python 时间戳用localtime转换时间戳较大时报错 ValueError: timestamp out of range for platform time_t 2.python面向对象编程 如 如何使用静态方法,类方法或者抽象方法? 方法是作为类的属性(attribute)存储的函数
阅读全文
摘要:python是一门动态解释性的强类型定义语言 Python能做什么? Python是一门综合性的语言,你几乎能在计算机上通过Python做任何事情,以下是Python应该最广泛的几个方面: 1.网络应用:包括web网站 、服务器后台服务等,在这方面Python有优秀的web框架如Django\Tor
阅读全文
摘要:补充一句,为兼容平台文件地址可以这么写: file = os.path.join('dir', 'file_name')
阅读全文
摘要:https://www.packtpub.com/web development/django example
阅读全文
摘要:coding:utf 8 import requests,MYSQLdb,time,re import urllib,urllib2 HOSTNAME='169...' #公共变量 主机IP def readSQLcase(): ''' sql = ''' conn = MYSQLdb.connec
阅读全文
摘要:原者:Bill Yuan 今天学习了Python中有关正则表达式的知识。关于正则表达式的语法,不作过多解释,网上有许多学习的资料。这里主要介绍Python中常用的正则表达式处理函数。 re.match re.match 尝试从字符串的开始匹配一个模式,如:下面的例子匹配第一个单词。 复制代码 imp
阅读全文
摘要:在Python中常用的三个“替换”函数是strip(),replace()和re.sub(),下面来讲讲这三个函数的用法。 一.replace() 基本用法:对象.replace(rgExp,replaceText,max) 其中,rgExp和replaceText是必须要有的,max是可选的参数,
阅读全文
摘要:python有木有哪些必须要学习的高级模块 字母表
阅读全文
摘要:http://blog.csdn.net/nb_ren/article/details/51774246
阅读全文
摘要:http://www.cnblogs.com/mao 19/p/5867238.html 【Python】Python中如何实现for循环step=2,step= 2 http://blog.csdn.net/henryghx/article/details/12408597
阅读全文
摘要:函数原型 声明:s为字符串,rm为要删除的字符序列 s.strip(rm) 删除s字符串中开头、结尾处,位于 rm删除序列的字符 s.lstrip(rm) 删除s字符串中开头处,位于 rm删除序列的字符 s.rstrip(rm) 删除s字符串中结尾处,位于 rm删除序列的字符 1. 当rm为空时,默
阅读全文
摘要:!/usr/bin/env python encoding:utf 8 import random think=random.randint(1,10) print ("......这是一个小游戏....") temp=input("你猜我心里想的是什么数字:") guess=int(temp) w
阅读全文
摘要:pip install flask i http://pypi.douban.com/simple
阅读全文
摘要:!/usr/bin/env python import os import json import simplejson as json t=os.popen("""sudo netstat tlpn |grep redis|grep 0.0.0.0|awk '{print $4}'|awk F:
阅读全文
摘要:http://dormousehole.readthedocs.io/en/latest/quickstart.html debug mode刚才那个pdf可以看这个网站
阅读全文
摘要:http://blog.csdn.net/caisini_vc/article/details/5619954
阅读全文

浙公网安备 33010602011771号