![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
若月若水
这个作者很懒,什么都没留下…
展开
-
使用py2exe生成独立的exe文件
今天写一个python小脚本,在windows下将当前状态下,所有的task的名字输出到一个文件里,然后将这个脚本转化成exe文件。先看一下python脚本TaskNameList.py: import subprocess# running the command "tasklist" in cmd.exepopen = subprocess.Popen("taskl...2010-09-02 15:01:06 · 159 阅读 · 0 评论 -
yield python
今天用到yield表达式了,找了一篇不错的讲解,贴在这个供自己和大家参考: Shortcut to Grokking yieldWhen you see a function with yield statements, apply this easy trick to understand what will happen:Insert a line result = [...原创 2010-09-03 15:49:05 · 135 阅读 · 0 评论