最近在阿里云租了一个云主机,打算部署自己的个人网站,但是centos系统的默认Python是2.6版本,打算升级到2.7.3!查看python的版本#python-VPython2.6.61.下载Python-2.7.3#wgethttp://python.org/ftp/python/2.7.3/...
分类:
编程语言 时间:
2014-09-19 11:42:15
阅读次数:
165
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Collections.Concurrent;
usingSystem.Threading;
usingSystem.Diagnostics;
namespaceConsoleApplication5
{
classProgram
{
staticvoidMain(..
分类:
其他好文 时间:
2014-09-19 02:22:35
阅读次数:
242
半开放socket通常socket是双向的,有时你会想建立一个单向的socket,单向的socket被称为半开放socket。为此,需要调用shutdown()函数,对于socket,这个操作是不可逆的。半开放socket可以用于一下情况:你想要确保所有写好的数据都已经被传送出去。当为了关闭socket的输出频道..
分类:
其他好文 时间:
2014-09-19 02:22:25
阅读次数:
411
在最近的Web课程设计上我接触到了Selenium这款Web自动化测试工具,它可以通过一系列find_element()方法定位到目标元素,对其发送模拟按键操作,使操作自动化。...
分类:
Web程序 时间:
2014-09-19 01:14:24
阅读次数:
237
1、Python中导入模块:import sys;相当于Java中的导入包、类。 比如,我们导入sys模块,使用:import sys;2、Python中调用函数的时候,会从默认配置的库文件夹中(sys.path)搜索你所调用的模块。这个库文件的目录配置,如下: sys.path用来配置Pyth.....
分类:
编程语言 时间:
2014-09-19 01:07:34
阅读次数:
230
# -*- coding: utf-8 -*-'''获取当前日期前后N天或N月的日期'''from time import strftime, localtimefrom datetime import timedelta, dateimport calendaryear = strftime("%...
分类:
编程语言 时间:
2014-09-19 01:06:34
阅读次数:
303
用Python实现模拟登录wap版百度贴吧+自动回贴...
分类:
编程语言 时间:
2014-09-18 23:49:54
阅读次数:
405
Python标准库中用来处理HTTP的模块是urllib2,不过其中的API太零碎了,requests是更简单更人性化的第三方库。用pip下载:pip install requests或者git:git clone git://github.com/kennethreitz/requests.git...
分类:
编程语言 时间:
2014-09-18 23:45:24
阅读次数:
401
1.简单线程实例 以及委托(同步委托、异步委托)using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Runtime....
分类:
编程语言 时间:
2014-09-18 23:40:34
阅读次数:
324
Python使用中面向对象的语言,支持继承、多态;
定义一个Person类:
>>> class Person:
... def sayHello(self):
... print('hello')
...
>>> Person.sayHello(None)
hello
>>> Person().sayHello()
hello
可以修...
分类:
编程语言 时间:
2014-09-18 22:22:34
阅读次数:
255