上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 基本不太好搞。可以参考如下讨论:http://stackoverflow.com/questions/728164/securely-erasing-password-in-memory-pythonhttp://stackoverflow.com/questions/982682/mark-data-as-sensitive-in-python/983525#983525http://www.ibm.com/developerworks/library/s-data.html 阅读全文
posted @ 2013-08-07 15:55 鸪斑兔 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 网上找到如下几个思路:1、用inspect模块2、用sys._getframe模块3、用sys.exc_traceback,先抛一个异常,然后抓出traceback#!/usr/bin/env python# -*- coding: utf-8 -*-import sysdef test(depth = 0): frame = sys._getframe(depth) code = frame.f_code print "frame depth = ", depth print "func name = ", code.co_name print &qu 阅读全文
posted @ 2013-08-07 14:55 鸪斑兔 阅读(16157) 评论(1) 推荐(0) 编辑
摘要: inspect — Inspect live objectsNew in version 2.1.The inspect module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects. For example, it can help you examine the contents of a class, re 阅读全文
posted @ 2013-08-07 12:18 鸪斑兔 阅读(408) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python#coding=utf-8def generate_counter(): CNT = [0] def add_one(): CNT[0] = CNT[0] + 1 return CNT[0] return add_onecounter = generate_counter()print counter() # 1print counter() # 2print counter() # 3 阅读全文
posted @ 2013-08-01 09:54 鸪斑兔 阅读(890) 评论(2) 推荐(1) 编辑
摘要: 当前有shell个脚本/tmp/test.sh,内容如下:#!/bin/bashexit 11使用Python的os.system调用,获取返回值是:>>> ret=os.system("/tmp/test.sh")>>> ret2816查看Manual没有说明。网上找到解释如下:os.system(cmd):该方法在调用完shell脚本后,返回一个16位的二进制数,低位为杀死所调用脚本的信号号码,高位为脚本的退出状态码。如果我们需要获得os.system的正确返回值,那使用位移运算(或者除以256)可以还原返回值:>>> 阅读全文
posted @ 2013-06-24 09:57 鸪斑兔 阅读(5667) 评论(1) 推荐(0) 编辑
摘要: 1、Replication status提示为stopped (primary detached),同步时提示VxVM VVR vxrlink ERROR V-5-1-4324 Cannot attach to_primary until ossrvg is recovered使用下面的命令重建主备复制连接,建好后会自动进行全同步。# vxrlink -g ossdg -a att to_secondary2、手动恢复同步关系1)解除主备间复制链路osssvr-1# vxrlink -g ossdg -f det to_secondaryosssvr-2# vxrlink -g ossdg - 阅读全文
posted @ 2013-04-18 11:00 鸪斑兔 阅读(862) 评论(0) 推荐(0) 编辑
摘要: 修改同步协议# vradmin -g ossdg set ossrvg protocol=TCP修改同步包大小# vradmin -g ossdg set wm_rvg packet_size=1400修改DCM主备机上均执行(主机名均为备机):# vradmin -g ossdg set wm_rvg osssvr-2 srlprot=autodcm删除rvg# vradmin -g ossdg -f delpri ossrvg手动切换复制关系# vradmin -g ossdg migrate ossrvg 192.168.0.83修改状态时passthru的rvg# vxvol -g o 阅读全文
posted @ 2013-04-18 10:52 鸪斑兔 阅读(590) 评论(0) 推荐(0) 编辑
摘要: ps -Lef 阅读全文
posted @ 2013-03-29 11:19 鸪斑兔 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 工信部油耗(综合工况)工信部油耗(市区工况)工信部油耗(市郊工况)网友油耗平均值2012款 新福克斯1.6L5档手动6.2L8.2L4.9L8.22012款 新福克斯1.6L6档双离合6.4L8.7L5.2L8.992013款 经典福克斯1.8L5档手动7.6L10.2L5.9L8.622013款 经典福克斯1.8L4档手自一体8.6L11.4L6.4L10.262012款 新福克斯 三厢1.6L5档手动6.2L8.2L4.9L7.912012款 新福克斯 三厢1.6L6档双离合6.4L8.7L5.2L9.352013款 经典福克斯 三厢1.8L5档手动7.2L9.9L5.... 阅读全文
posted @ 2013-03-16 23:53 鸪斑兔 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 2012Rank2011RankVehicle2012YearEnd2011YearEnd%Change报价#1#1FordF-Series645,316584,91710.30%/#2#2ChevroletSilverado418,312415,1300.80%/#3#3ToyotaCamry404,886308,51031.20%14.48万-35.18万#4#6HondaAccord331,872235,62540.80%15.38万-35.29万#5#12HondaCivic317,909221,23543.70%11.10万-27.18万#5.1#12.1HondaC... 阅读全文
posted @ 2013-03-09 19:11 鸪斑兔 阅读(333) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页