2012年9月24日

apache --安装

摘要: 为了使用Nfsen,需要安装许多东西开始时在官网上下了http://httpd.apache.org/download.cgi#verifylinux apache2.2.23试着装了一下,当时linux中的libtool版本是1.5.22./configuremakemake install安装apache时出现configure: error: Cannot use an external APR with the bundled APR-util在网上找的解决办法大致是这样的configure: error: Cannot use an external APR with the bun 阅读全文

posted @ 2012-09-24 11:40 龙沙宝石 阅读(558) 评论(0) 推荐(0) 编辑

2012年9月22日

fprobe--安装

摘要: 1-- 下载fprobe: http://pkgs.org/centos-5-rhel-5/centalt-i386/fprobe-1.1-2.el5.i386.rpm.html 下载的是这个:fprobe-1.1-2.el5.i386.rpm 点击文件图标下载2--安装fbrobe依赖libpcap 下载了libpcap.so.1.1.1 安装:./configure make makeinstall3--安装fprobe(使用rpm命令,以前没用过,可以rpm -h) rpm -i fprobe-1.1-2.el5.i386.rpm 然后输... 阅读全文

posted @ 2012-09-22 16:57 龙沙宝石 阅读(1434) 评论(0) 推荐(0) 编辑

2012年9月19日

iperf

摘要: iperf 阅读全文

posted @ 2012-09-19 11:53 龙沙宝石 阅读(128) 评论(0) 推荐(0) 编辑

2012年9月11日

python--装饰器

摘要: 装饰器:对函数的包装1--被装饰的函数不带参数#"""无参数调用decorator声明时必须有一个参数,这个参数将接收要装饰的方法"""def deco(func):#deco对func进行包装... print 'start'... func()... print 'end'... return func... >>> @deco... def my():... print 'is my'... startis myend#注意:当使用上述方法定义一个decorato 阅读全文

posted @ 2012-09-11 11:47 龙沙宝石 阅读(365) 评论(0) 推荐(1) 编辑

2012年8月23日

python--类属性的访问

摘要: 在python2.5上运行时只有通过类名访问类属性才可以改变类的属性但是在python3.2上运行时,通过类或是实例访问类属性并修改后,都是会改变类属性的值 阅读全文

posted @ 2012-08-23 19:43 龙沙宝石 阅读(230) 评论(0) 推荐(0) 编辑

2012年8月20日

python--closure

摘要: closure概念:在一个内部函数中,对外部作用域的变量进行引用,那么内部函数就被认为是closure(闭包)自由变量:定义在外部函数内,被内部函数引用或者使用的变量为自由变量函数func_closure 在函数被调用前和调用后使用,效果是一样的#!/user/bin/env python#coding:UTF-8#func_closure: 这个属性仅当函数是一个闭包时有效#指向一个保存了所引用到的外部函数的变量cell的元组#如果该函数不是一个内部函数,则始终为None。这个属性也是只读的。output = '<int %r id = %#0x val =%d>' 阅读全文

posted @ 2012-08-20 16:56 龙沙宝石 阅读(1971) 评论(1) 推荐(0) 编辑

2012年8月16日

python--安装BeautifulSoup

摘要: 下载地址:http://www.crummy.com/software/BeautifulSoup/解压:进入BeautifulSoup.*目录安装,目录下执行 python setup.py install 阅读全文

posted @ 2012-08-16 16:53 龙沙宝石 阅读(214) 评论(0) 推荐(0) 编辑

2012年8月14日

linux--TC

摘要: 转自:http://wenku.baidu.com/view/f02078db50e2524de5187e45.htmllinux下流量控制工具TC详细说明及应用实例目录一、TC的安装.................................................................................................................................... 1二、TC原理介绍.................................................................. 阅读全文

posted @ 2012-08-14 10:44 龙沙宝石 阅读(12939) 评论(0) 推荐(0) 编辑

2012年8月10日

python--标准类型操作符

摘要: 对象值的比较任何相同类型的对象都可以比较,格式为:a == b,在python2.3之前类型不具有布尔值,返回值为1 0;2.3版本之后返回只为 True False对象身份的比较obj1 is obj2 --obj 与obj2是同一个对象 return True Falseobj1 is notobj2--obj 与obj2是同一个对象return True False布尔类型--python中的与、或、非布尔类型的优先级依次为:not and or --实现功能为逻辑 非 与 或标准类型的内建函数cmp(obj1, ob... 阅读全文

posted @ 2012-08-10 16:03 龙沙宝石 阅读(380) 评论(0) 推荐(0) 编辑

python--writefile&readfile

摘要: writefile#!/usr/bin/env python'makeTextFlie.py --create text file'import osls = os.linesep#get filenamefname = raw_input('input your file name:\n')while True: if os.path.exists(fname): print "error: '%s' already exists\n" % fname else: break#get file content linesal 阅读全文

posted @ 2012-08-10 15:44 龙沙宝石 阅读(6112) 评论(0) 推荐(0) 编辑

导航