def fab(max): n, a, b = 0, 0, 1 while n < max: yield b # print b a, b = b, a + b n = n + 1> for n in fab(5): ... print n ... 1 1 2 3 5有 yield 的函数在 Py
windows 下安装python环境,好像不装也可以?下载解压相应版本pyinstaller, 进入主目录,运行python pyinstaller.py -F pyfile_path 会生成相应py文件名的目录exe在dist目录下。。http://www.crifan.com/use_pyinstaller_to_package_python_to_single_executable_exe
多线程内存泄露
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号