- 授权协议: MIT
- 开发语言: SHELL
- 操作系统: 跨平台
- 软件首页: https://github.com/Russell91/runcython
软件介绍
Runcython 旨在简化 Cython 的使用过程,而不会牺牲掉可扩展性。在任何 Python 程序中使用 cython,main.py,只需要做
$ mv main.py main.pyx && runcython main.pyx
在标准的 cython 的构建程序里,运行 myprogram.py(x) 需要创建 myprogram.c,setup.py,myprogram.so 和 finally_user.py。流行的 pyximport 工具将这五个工具减少为两个,但这只是用于创建简单的构建。Runcython 走完了最后一步,只需要一个文件。它也可以用来处理复杂的构建方式,适用于任何 C/C++ 黑客。
示例代码:
# primes.pyx def primes(int kmax): cdef int n, k, i cdef int p[1000000] result = [] if kmax > 1000000: kmax = 1000000 k = 0 n = 2 while k < kmax: i = 0 while i < k and n % p[i] != 0: i = i + 1 if i == k: p[k] = n k = k + 1 result.append(n) n = n + 1 return result def main(): print primes(5)
Out of Control
Kevin Kelly / Basic Books / 1995-4-14 / USD 22.95
Out of Control is a summary of what we know about self-sustaining systems, both living ones such as a tropical wetland, or an artificial one, such as a computer simulation of our planet. The last chap......一起来看看 《Out of Control》 这本书的介绍吧!
