码迷,mamicode.com
首页 >  
搜索关键字:python    ( 135041个结果
关于括号(1)
正则不好搞,像一门新语言(还比较特殊,可以到处用,但在不同语言里又有特色的东西)把老忘得东西记下1. python中 (自留地里面写了其实)m.groups()=m.groups(0)=(m.group(1),m.group(2))'''获得一个元组,仅是括号匹配的内容'''m.group()=m....
分类:其他好文   时间:2015-08-10 11:55:28    阅读次数:136
Solaris 10u11 安装python2.7.10
##检查GCC版本-bash-3.2#gcc--version gcc(GCC)3.4.3(csl-sol210-3_4-branch+sol_rpath) Copyright(C)2004FreeSoftwareFoundation,Inc.##下载python编译程序-bash-3.2#wget--no-check-certificate##解压缩Python-bash-3.2#gunzipPython-2.7.10.tgz -bash-3.2#tarxvfPython-2.7...
分类:编程语言   时间:2015-08-10 10:49:34    阅读次数:352
Python之Window环境搭建
一,安装Python 我下载的版本是:Python 3.4.3,下载地址是:https://www.python.org/downloads/windows/ 选择:Latest Python 3 Release - Python 3.4.3 然后下载你所需要的安装包: 下载后,下一步下一步安装即可。 安装过程中,会自动的将Python添加到系统的环境变量中。 打开cm...
分类:编程语言   时间:2015-08-10 10:41:21    阅读次数:151
零基础学python-1.6 错误的程序
这节来讨论一下当程序出现错误的时候是怎样的? 1.还是以上一章节的代码作为例子 print("hello world") print("i am ray") print("i love China \n" * 8) print("welcome to my class") print(over") 最后一句那里,明显少了一个双引号,点击F5或者Run Module之后,会出现下面情...
分类:编程语言   时间:2015-08-10 09:30:01    阅读次数:125
Python于*args 和**kwargs使用
1,*args 当量list名单def fun_args(farg, *args): print "arg:", farg for value in args: print "another arg:", value fun_args(1, "2", 3)...
分类:编程语言   时间:2015-08-10 09:24:42    阅读次数:158
learn python the hard way-ex3
运算符号 + plus? -minus? / slash * arterisk %percent <less than >greater than <=less than equal >=greater than equal http://learnpythonthehardway.org/book/ex3.html...
分类:编程语言   时间:2015-08-10 08:19:51    阅读次数:141
python cookbook 2 数字 日期 时间(2)
5.字节到大整数的转换 #拥有128位长的16个元素的字节字符串。 >>>?data?=?b‘\x00\x124V\x00x\x90\xab\x00\xcd\xef\x01\x00#\x004‘ >>>?len(data) 16 将bytes解析为整数,使用?int.from_bytes()?方法 #仅使用...
分类:编程语言   时间:2015-08-10 08:18:12    阅读次数:221
python爬虫获取校园网新闻
首先打开校园网(以我的学校为例"http://www.zhbit.com/") 现在我们需要获取上图红色框框的数据并输出 下面我们打开浏览器的开发模式并定位到相应的代码 不难发现,学校要闻只显示5条信息 下面我们就开始写程序 #?...
分类:编程语言   时间:2015-08-10 08:16:29    阅读次数:931
在mac下配置Git服务器
一,设置远程访问logout 当前账户,使用 git 账户登录;在System Preferences->Sharing 中,勾选:Web Sharing 和 Remote Logig。二. 下载安装gitosis1,Mac Snow默认已经为我们安装了 Git 和 Python,可以使用如下命令查...
分类:系统相关   时间:2015-08-10 07:04:42    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!