易截截图软件、单文件、免安装、纯绿色、仅160KB

删除工程中svn文件的脚本(Ruby版和Python版)

两种不同的语言,不同的表达!
Python脚本实现.
""
"
    File Name : clean.py
    File Date : 2009/11/5 14:22:56
    Author     : DannyLai
    Purpose     : Clean the svn files
             All svn projects have an hide directory "
.
svn"
             The python script purpose is to clean the .svn directory in svn projects.
    
"
""
import
os
import
stat
SVNPROJECT_DIR =
"F:\\temp\\google-gdata"
def
findSVNDir(
path )
:
    for
file in
os.
listdir(
path )
:
        subpath =
os.
path.
join(
path,
file )
        if
os.
path.
isdir(
subpath )
:
            if
file =
=
".svn"
:
                print
subpath
                deleteSVNDir(
subpath )
            else
:
                findSVNDir(
subpath )
                
def
deleteSVNDir(
path )
:
    for
file in
os.
listdir(
path )
:
        subpath =
os.
path.
join(
path,
file )
        
        if
os.
path.
isdir(
subpath


相关文档:

python 3.0与python 2.x的区别

 正在阅读最新版的《A byte of Python》。发现Python3.0在某些地方还是有些改变的。准备慢慢的体会,与老版本的《A byte of Python》做对比,最后再去查阅官方网站的文档。
1.
如果你下载的是最新版的Python,就会发现所有书中的Hello World例子将不再正确。
Old:
print "Hello World!" #打印字符串
New:
......

Python PAMIE示例

 转自:http://blog.chinaunix.net/u3/103146/showart_2058891.html
Python这种脚本语言的强大功能越来越被广大的程序员所重视,这种之前在国内流行度不高的语言近来气势高涨。各种第三方模块层出不穷。
 
本文介绍的便是一种能非常方便操作IE的第三方工具,PAMIE,他能让你如同写JS一样来操作IE浏览器。包括自 ......

清楚VSS文件的批处理(Ruby版)

 
def delVss(path)
  if File.directory?(path)
    for f in d = Dir.open(path)
        fpath = File.join(path, f) 
      if(f!="."&&f!="..")      
    ......

用python的cmd模块写一个简单的shell

 from cmd import *
class MyShell(Cmd):
    def preloop(self):
        print "print this line before entering the loop"
            
    def postloop(self):
&nb ......

学习《Python语言入门》第十章框架与应用

关于框架,之前听得比较多,特别是在CPyG的邮件列表上,不过还没有接触过。
这一章我打算略读,加上这两天身体不适,读得更加略了。
这一章提到的几个框架我听说的有TKinter和SWIG。SWIG搞了一下,TKinter看人家用过,自己还没有用过。对这些框架陌生得很。以后碰上要用了再认真学学。
到现在,对Python算是有些了解了。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号