摘要: OS:linuxLanguage:pythonCode:# -*- coding: utf - 8 -*-import osprint os.listdir("/media/cdrom0") 阅读全文
posted @ 2013-03-10 15:16 CowboyRyan 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 单行注释为 ## 这个是 注释print “hello world"多行注释是 """"""第一句话第二句话第三句话三个双引号"""'''这是另一种注释;三个单引号''' 阅读全文
posted @ 2013-03-10 14:32 CowboyRyan 阅读(168) 评论(0) 推荐(0) 编辑
摘要: python 在调用 C模块时候,Mac OS 和 linux 的后缀名不同。Linux上是:libc.so.6Mac 上是:libc.dylib代码大致如下:(Mac)from cytypes import *libc = CDLL("libc.dylib")message_string = "this is C\n"libc.printf("Testing:%s",message_string) 阅读全文
posted @ 2013-03-10 13:16 CowboyRyan 阅读(281) 评论(0) 推荐(0) 编辑