Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20993
  • 博文数量: 27
  • 博客积分: 585
  • 博客等级: 中士
  • 技术积分: 270
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-20 17:11
文章分类

全部博文(27)

文章存档

2013年(1)

2012年(26)

我的朋友
最近访客

发布时间:2012-12-27 11:24:26

目标端:是提供磁盘的 1     1.1    其中一台服务器创建ISCSI Target(初次使用需要使用suse11sp1安装盘安装) 进入yast界面,在xshell中输入yast进入该界面。或者直接在图形界面设置 Network Services->iSCSI Target 增加一个Target Target命名:Target = “iqn.2008-12.com”, Identifier=”test”,这两个值都可以修改; 添加共享磁盘   -----------......【阅读全文】

阅读(268) | 评论(0) | 转发(0)

发布时间:2012-12-27 10:43:07

二十七、局部变量的使用     age = 22 name = 'Swaroop' print '%s is %d years old' % (name, age)  #注意使用 print 'Why is %s playing with that python?' % name     二十八、python中语句很长的时候   s = 'this is a string .\      This continues the string ' print s......【阅读全文】

阅读(140) | 评论(0) | 转发(0)

发布时间:2012-12-27 10:41:09

二十一、使用函数* lambda语句被用来创建新的函数对象,并且在运行时返回它们   def make_repeater(n):     return lambda s: s*n          #这个最他妈重要 twice = make_repeater(2) print twice('word') print twice(5)   --------------------------- 结果 wordword 10 &nbs......【阅读全文】

阅读(161) | 评论(0) | 转发(0)

发布时间:2012-12-27 10:39:16

十七、python中向本地写入文件   将新的内容写入到D:\soft\poem.txt中去   poem = '''\ Programming is fun When the work is done if you wanna make your work also fun:         use Python! ''' f = file('D:\soft\poem.txt', 'w') # 这里使用的是写模式,还有读模式‘r’,追加模式('a') f.write(poem)......【阅读全文】

阅读(137) | 评论(0) | 转发(0)

发布时间:2012-12-27 10:37:30

十三、__del__的使用 有一个特殊的方法__del__,它在对象消逝的时候被调用。对象消 逝即对象不再被使用,它所占用的内存将返回给系统作它用   十四、class的使用 class person:     count = 0     def __init__(self,name,age):         self.name=name         self......【阅读全文】

阅读(195) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册