码迷,mamicode.com
首页 >  
搜索关键字:python module    ( 144473个结果)
单例模式
单例模式在Python中可以查看这里借用里面一段话,说的相当明白:I don't really see the need, as a module with functions (and not a class) would serve well as a singleton. All its va...
分类:其他好文   时间:2014-08-23 13:52:10    阅读次数:242
python高级编程之选择好名称:命名指南
##-*-coding:utf-8-*-##python:2.x#__author__='Administrator'#命名指南#一组常用的命名规则可以被应用到变量,方法函数和属性上,类和模块的名称在命名空间叫是扮演重要角色的,所以一般有2个模式:觉模式和反模式#使用has,is前缀命名布尔元素,例...
分类:编程语言   时间:2014-08-23 12:40:40    阅读次数:338
Edit Distance (or Levenshtein Distance) python solution for leetcode EPI 17.2
https://oj.leetcode.com/problems/edit-distance/Edit DistanceGiven two wordsword1andword2, find the minimum number of steps required to convertword1tow...
分类:编程语言   时间:2014-08-23 09:56:50    阅读次数:213
博客地图
七日python之路 七日python -- 第一天 七日python -- 第二天 ... scrapy爬虫 python爬虫----(1. 基本模块) ... pytnon基础 python基本 -- threading多线程模块的使用 python基本 -- mysql 的使用...
分类:其他好文   时间:2014-08-23 04:38:50    阅读次数:171
python用while打印输出乘法口诀表
看了好多网上写的乘法口诀打印,觉得好多写的都不适合新手理解,今天参考了一些小例子,写了这个小脚本,希望在学习的新手看看这个,理解python中的while语句会有一定的帮助。我把每一行都写了助视,大家直接复制就可以运行的一段代码,涉及的内容还是有这么几个方面,直接把代..
分类:编程语言   时间:2014-08-23 02:28:20    阅读次数:444
下载并遍历 names.txt 文件,输出长度最长的回文人名。
```python def is_pamax(name): low = 0 up = len(name)-1 while low < up: if name[low] != name[up]: return False low += 1 up -= 1 return True f = open("D:/names.txt") max_length = 0 for line in f: nam...
分类:其他好文   时间:2014-08-23 01:12:09    阅读次数:383
Linux驱动开发之初始化参数
先上代码: #include #include #include #include static char* whom = "World"; static int howmany = 1; module_param( howmany, int, S_IRUGO ); module_param( whom, charp, S_IRUGO ); static int hello_ini...
分类:系统相关   时间:2014-08-23 01:08:59    阅读次数:367
Python:常用函数封装
def is_chinese(uchar): """判断一个unicode是否是汉字""" if uchar >= u'\u4e00' and uchar= u'\u0030' and uchar= u'\u0041' and uchar= u'\u0061' and u...
分类:编程语言   时间:2014-08-22 23:45:19    阅读次数:330
优美地启动多线程[Python]
优美的使用多线程...
分类:编程语言   时间:2014-08-22 21:12:29    阅读次数:234
python搭建web server
如果你急需一个简单的Web Server,但你又不想去下载并安装那些复杂的HTTP服务程序,比如:Apache,ISS等。那么, Python 可能帮助你。使用Python可以完成一个简单的内建 HTTP 服务器。于是,你可以把你的目录和文件都以HTTP的方式展示出来。佻只需要干一件事情,那就是安装一个Python。 实际上来说,这是一个可以用来共享文件的非常有用的方式。实现一个微型的HTT...
分类:编程语言   时间:2014-08-22 21:10:52    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!