Cython 【翻译】Cython教程2_Cython语法扩展 Cython语法扩展 介绍 首先我们要了解如何扩展Cython,除了使用Python类语句创建普通的用户定义类之外,Cython还允许创建新的内置Python类型,称为扩展类型。您可以使用cdef类语... 03月25日 阅读 6,248 views 发表评论 阅读全文
Cython 【翻译】Cython教程1_Cython语言基础 C语言变量以及类型定义在Cython 使用cdef关键字,用来定义C变量以及各种结构体,枚举类型变量,如下: cdef int i, j, k cdef float f, g[42], *h cdef... 03月25日 阅读 11,098 views 发表评论 阅读全文
Cython 【分享】【翻译】Cython开发指南 本文是继上文而来: 【整理】从stack overflow的一个问题引发的思考(C++封装为Python可用接口) 最近开发中有个需求需要把一套C++的API封装为Python可用的库,所以,就开始了... 03月25日 阅读 7,690 views 发表评论 阅读全文
Python 【分享】PyQt QTableView示例代码(QStandardItemModel+QTableView) 首先看下效果: 代码: from PyQt4 import QtCore, QtGui import sys if __name__ == '__main__': app = Qt... 03月20日 阅读 17,155 views 发表评论 阅读全文
Python 【分享】【2】PyQt SplashScreen示例,PyQt启动界面演示 效果: 代码: from PyQt4.QtCore import * from PyQt4.QtGui import * import time class Form(QDialog): "... 03月15日 阅读 6,193 views 发表评论 阅读全文
Python 【分享】【1】PyQt SplashScreen示例,PyQt启动界面演示 效果: 代码: from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import QtCore, QtGui import ... 03月15日 阅读 4,575 views 发表评论 阅读全文
Python 【分享】PyQt线程定时器 首先看下实现效果: 下面是代码: import sys import time from PyQt4 import QtCore, QtGui #继承QThread class TimerThread... 03月13日 阅读 5,737 views 发表评论 阅读全文
Python 【整理】python多进程之间共享queue 参考:http://stackoverflow.com/questions/9908781/sharing-a-result-queue-among-several-processes 默认情况下,使... 03月10日 阅读 5,042 views 发表评论 阅读全文
Python 【整理】Python可变参数即python *args **kargs指的什么 如果想搞清楚python的*args **kargs什么意思,看下如下代码便清楚了. 其实*args指的就是不带key的可变参数, **kargs就是带key的可变参数. def foo_single... 03月07日 阅读 10,162 views 发表评论 阅读全文
Python 【整理】Python如何停止循环中的Thread? 参考:http://stackoverflow.com/questions/18018033/how-to-stop-a-looping-thread-in-python Python中的线程,有时候... 03月06日 阅读 10,588 views 发表评论 阅读全文