码迷,mamicode.com
首页 >  
搜索关键字:python lambda    ( 138480个结果)
python第二天
python的编程环境(第二天)1.Linux环境1)大部分linux发行版本均默认安装了python的环境,如想下载不同的版本,可以到python官网上下载。(www.python.org).软件安装方法参考linux软件安装2)在终端中输入python既可以使用python交互模式登录方式:图1linux环境下的python界面退..
分类:编程语言   时间:2014-08-08 16:25:16    阅读次数:209
python写的第一个简单小游戏-猜数字
1 #Filename:game1.py 2 3 guess=10 4 running=True 5 while running: 6 try: 7 answer=int(raw_input('Guess what i think:')) 8 ...
分类:编程语言   时间:2014-08-08 15:59:16    阅读次数:215
DenyHosts 安装及配置详解
DenyHosts是Python语言写的一个程序,它会分析sshd的日志文件(/var/log/secure),当发现重 复的攻击时就会记录IP到/etc/hosts.deny文件,从而达到自动屏IP的功能。下面进入主题。1。安装脚本 要求安装服务器能上网,并建立 /workspace目录#####...
分类:其他好文   时间:2014-08-08 15:46:06    阅读次数:268
python 获取当前时间
我有的时候写程序要用到当前时间,我就想用python去取当前的时间,虽然不是很难,但是老是忘记,用一次丢一次,为了能够更好的记住,我今天特意写下python 当前时间这篇文章,如果你觉的对你有用的话,可以收藏下。取得时间相关的信息的话,要用到python time模块,python time模块里面...
分类:编程语言   时间:2014-08-08 15:45:26    阅读次数:490
The Zen of Python
zen 即禅之意可以在python的命名行交互模式下以下的语句就能看到:import thisThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple i...
分类:编程语言   时间:2014-08-08 15:25:46    阅读次数:262
2014-08-05 pig
Pig的数据类型能够分为两种:一种是scalar类型,包含单一的value,一种是complex类型,包含有其他的类型。对于scalar类型:int,long,float,double,chararray(取代了string),bytecharray.复杂点的类型:1、Map(我用python编写的...
分类:其他好文   时间:2014-08-08 15:14:36    阅读次数:209
python manage.py 命令
在用命令django‐admin.py startproject 建立一个django工程文件时,会生成一个manage.py文件,那么这个manage.py到底可以干嘛呢? manage.py是一种命令行工具,允许以多种方式与所建立的Django项目进行交互。键入python man...
分类:编程语言   时间:2014-08-08 15:09:56    阅读次数:989
use python get information from one page
1 #!/usr/bin/python 2 3 read = file('thread-1554-1-1.html','r') 4 wr = file('list','w') 5 6 while 1: 7 line=read.readline() 8 if 'href' in ...
分类:编程语言   时间:2014-08-08 12:27:06    阅读次数:629
python 查找IP地址归属地
#!/usr/bin/env python# -*- coding: utf-8 -*-#查找IP地址归属地#writer by keery_log#Create time:2013-10-30#Last update:2013-10-30#用法: python chk_ip.py www.goog...
分类:编程语言   时间:2014-08-08 12:25:55    阅读次数:284
Python:print输出中文
python3 print输出unicode字符时出现以下错误:UnicodeEncodeError: 'gbk' codec can't encode character '\u30fb解决方法:sys.stdout = io.TextIOWrapper(sys.stdout.buffer, er...
分类:编程语言   时间:2014-08-08 12:21:35    阅读次数:431
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!