上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 38 下一页
  2013年6月18日
摘要: Help on function uuid4 in module uuid:uuid4() Generate a random UUID. 阅读全文
posted @ 2013-06-18 15:23 语辰 阅读(1124) 评论(0) 推荐(0) 编辑
摘要: random.randint(a,b) 用于生成一个指定范围内的整数,a为下限,b为上限,生成的随机整数a<=n<=b;若a=b,则n=a;若a>b,报错import randomrandom.randint(10,20)#输入18random.randint(10,10)#输出10random.randint(20,10) #error*****************************************************random.randrange([start], stop [,step]) 从指定范围内,按指定基数递增的集合中获取一个随机数,基数 阅读全文
posted @ 2013-06-18 14:24 语辰 阅读(295) 评论(0) 推荐(0) 编辑
  2013年6月17日
摘要: RBCXF-CVBGR-382MK-DFHJ4-C69G8 阅读全文
posted @ 2013-06-17 16:52 语辰 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Help on function getuser in module getpass:getuser() Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. 阅读全文
posted @ 2013-06-17 16:29 语辰 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 用__file__ 来获得脚本所在的路径,比如文件在/root下cat tee#!/usr/bin/env pythonprint __file__ #得到相对路径tee——————————————————————————————————————import os#!/usr/bin/env pythonprint os.path.realpath(__file__) #得到绝对路径/root/tee 阅读全文
posted @ 2013-06-17 16:01 语辰 阅读(774) 评论(0) 推荐(0) 编辑
摘要: Help on built-in function getcwd in module posix:getcwd(...) getcwd() -> path Return a string representing the current working directory. 阅读全文
posted @ 2013-06-17 15:45 语辰 阅读(446) 评论(0) 推荐(0) 编辑
  2013年6月13日
摘要: http://www.fwolf.com/blog/post/191 阅读全文
posted @ 2013-06-13 16:59 语辰 阅读(69) 评论(0) 推荐(0) 编辑
摘要: http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIScriptAlias.html 阅读全文
posted @ 2013-06-13 16:52 语辰 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash my_fun() { echo "$#" } echo 'the number of parameter in "$@" is '$(my_fun "$@") echo 'the number of parameter in "$*" is '$(my_fun "$*")执行:./my.sh p1 "p2 p3" p4后返回:the number of parameter in "$@" is 3th 阅读全文
posted @ 2013-06-13 16:28 语辰 阅读(520) 评论(0) 推荐(0) 编辑
摘要: >>> a = "hello\nhow are you\ni am fine">>> print ahellohow are youi am fine>>> b = a.splitlines()>>> print b['hello', 'how are you', ' i am fine'] 阅读全文
posted @ 2013-06-13 14:30 语辰 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 38 下一页