- 博客(7)
- 资源 (13)
- 收藏
- 关注
转载 如何解决linux的ssh连接自动断开的问题
使用crt连接linux,会发现一种自动断线的问题。后来由篇文章是说,设置一个NO-OP参数,如下图: 根据自己的需要设置时间间隔就可以了。
2013-01-30 11:45:39 1119
转载 python的{}字典操作
一个简单的for语句就能循环字典的所有键,就像处理序列一样: In [1]: d = {'x':1, 'y':2, 'z':3} In [2]: for key in d: ...: print key, 'corresponds to', d[key] ...: y corresponds to 2 x corresponds to 1 z cor
2013-01-24 16:32:29 2278
转载 python的list操作
原文地址:http://blog.csdn.net/facevoid/article/details/5338048 创建列表 sample_list = ['a',1,('a','b')] Python 列表操作 sample_list = ['a','b',0,1,3] 得到列表中的某一个值 value_start = sample_list[0] end_value = sa
2013-01-24 11:12:17 1576
原创 python使用json格式进行数据封装
官方地址(英文):http://simplejson.readthedocs.org/en/latest/ 最简单的使用方法是: >>> import simplejson as json >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) '["foo", {"bar": ["baz", null, 1.0, 2]}]' >>> p
2013-01-23 11:43:05 4770
转载 python的条件(三元)运算符——实现b? x: y
三元运算符是C/C++/C#一系语言所特有的一类运算符,例如: b? x: y 对表达式b? x: y,先计算条件b,然后进行判断,如果b的值为true,则计算并返回x的值,否则计算并返回y的值。 在Python中,提供了专门的逻辑分支表达式来模拟C系中的三元运算,我们也可以在一行语句中完成三元运算。 x = true_value if condition els
2013-01-23 11:07:01 2583
转载 解决SecureCRT中文显示乱码
原文路径:http://blog.csdn.net/malundao/article/details/6584209 操作步骤 以下两步: 远程linux机器。修改环境变量LANG。例如在~/.bash_profile里面添加 [plain] view plaincopyprint? export LANG=zh_CN.UTF8 export
2013-01-20 20:00:45 1179
原创 最近碰到一些python的小知识点,容易错的地方
1.第一个问题 def getParents(child,parents=[]): if child: parents.append(child) return getParents(child-1,parents) else: return parents # import pdb # pdb.set_t
2013-01-14 23:10:59 1987 1
secureCRT-7.3.2-752-ubuntu 64位(免注册啦)
2015-03-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人