易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

网站模拟登陆备忘(php + python)

 php版:
<?php
$cookie_file = fopen('cookie.txt','w');//dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt"; // 设置Cookie文件保存路径及文件名

function vlogin($url,$data){ // 模拟登录获取Cookie函数
$curl = curl_init(); // 启动一个CURL会话
curl_setopt($cur ......

python如何连接MySQL数据库

 
#!/usr/bin/env python
# -*-coding:UTF-8-*-#这一句告诉python用UTF-8编码
#=========================================================================
#
# NAME: Python MySQL test
#
# AUTHOR: benyur
# DATE  : 2004-12-28
#
# COMMENT: 这是一个python连接mysql的例子
#
#================ ......

python处理zip文件

转自 http://hi.baidu.com/xunxun129/blog/item/3befad0f8ff992c07bcbe180.html
有时我们需要在 Python 中使用 zip 文件,而在1.6版中,Python 就已经提供了 zipfile 模块可以进行这样的操作。不过 Python 中的 zipfile 模块不能处理多卷的情况,不过这种情况并不多见,因此在通常情况下已经足够使用了。下面我只是对 ......

python pyc

 什么是pyc文件
pyc是一种二进制文件,是由py文件经过编译后,生成的文件,是一种byte code,py文件变成pyc文件后,加载的速度有所提高,而且pyc是一种跨平台的字节码,是由python的虚拟机来执行的,这个是类似于JAVA或者.NET的虚拟机的概念。pyc的内容,是跟python的版本相关的,不同版本编译后的pyc文件是不同的,2 ......

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

 from cmd import *
class MyShell(Cmd):
    def preloop(self):
        print "print this line before entering the loop"
            
    def postloop(self):
&nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号