Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Ö®ìø

import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough t ......

RUBY EXCEL²Ù×÷

 ÓÃrubyн¨Ò»¸öexcelÎļþ£¬²¢ÇÒÉèÖÃһЩֵ¡£
 require 'win32ole'
excel = WIN32OLE.new("excel.application")       
excel.Visible = true
excel.WorkBooks.Open("d:\\test.xls")
excel.WorkSheets("sheet1").Activate
excel.Cells(2,3).value = "ÕÅÈý"
exce ......

Andorid»·¾³Python±à³Ì

 http://code.google.com/p/android-scripting/
Android¿ªÊ¼Ö§³Ö½Å±¾ÓïÑÔPython¡¢Lua¼°Beanshell£¬Î´À´»¹½«Ö§³ÖRuby
×÷Õß Werner Schuster ÒëÕß ÕÅÁú ·¢²¼ÓÚ 2009Äê7ÔÂ5ÈÕ
Android Scripting Environment£¨ASE£©ÏîĿΪAndroidÔö¼ÓÁ˽ű¾Ö§³Ö¡£Í¨¹ý°²×°ASE£¬ÎÒÃÇ¿ÉÒÔÔÚÉ豸Éϱàд½Å±¾²¢Ö´ÐС£
ËäÈ»ÏÖÔÚÒѾ­Ó¿ÏÖ³öÁ ......

[_Êý¾ÝÍÚ¾ò_] pythonʵ¼ùÖ®1

 ¼Æ»®Õâ¸öÐÇÆÚѧϰÓÃpythonʵÏÖ¾ö²ßÊ÷Ëã·¨¡£½ñÍí¾ÍÅöµ½Á˺öàÎÊÌ⣬ºÃ¾ÃûÓÐÓÃpythonÁË£¬²¢ÇÒ3.0ºÍÊé±¾ÉϵÄÓÐЩ¶«Î÷²»Ì«Ò»Ö£¬ÕâÀï¼Ç¼Ï¼¸¸öµØ·½¡£
1£© import module Èç¹û²»ÊÇÔÚ±ê׼Ŀ¼Ï£¨ÏµÍ³µÄpath£¬pythonµÄĿ¼£¬µ±Ç°Ä¿Â¼£©£¬ÄÇôÐèÒªÏÈimport sys£¬È»ºósys.path.append('')£»
2£© ¸Ä±äÔ´Îļþºó£¬ÔÙ´Îimport ......

ÓÃ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ºÅ