Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃpythonµÄcmdÄ£¿éдһ¸ö¼òµ¥µÄshell

 from cmd import *
class MyShell(Cmd):
    def preloop(self):
        print "print this line before entering the loop"
            
    def postloop(self):
        print "print this line after leaving the loop"
    
    def precmd(self, line):
        print "print this line before do a command"
        return Cmd.precmd(self, line)
    
    def postcmd(self, stop, line):
        print "print this line after do a command"
        return Cmd.postcmd(self, stop, line)   
            
    def do_test(self, line):
        ''' test command, just print the arguments except some special ones'''
        if line == "exit":
            exit()
        else:
            print line
    
MyShell().cmdloop()
#¼Ì³ÐcmdÄ£¿éµÄCmdÀàʵÏÖ
#shellÖеÄÃüÁîxxÔÚÀàÖжÔÓ¦µÄº¯ÊýÃûΪdo_xx
#lineÊÇshellÖÐÊäÈëµÄÃüÁîÐвÎÊý


Ïà¹ØÎĵµ£º

Python 3.x (1):ÈëÃÅ

 
1 ÄãºÃ
#´ò¿ªÐ´°¿Ú,ÊäÈë:
#! /usr/bin/python
# -*- coding: utf8 -*- 
s1=input("Input your name:")
print("ÄãºÃ,%s" % s1)
'''
֪ʶµã:
    * input("ij×Ö·û´®")º¯Êý:ÏÔʾ"ij×Ö·û´®",²¢µÈ´ýÓû§ÊäÈë.
    ......

python¿ì½Ý¼ü»ã¼¯


Ctrl+3            ÐÐ×¢ÊÍ
Ctr+\               È¥ÐÐ×¢ÊÍ
Ctrl+Shift+3   È¥ÐÐ×¢ÊÍ
Ctrl+4            ¿é×¢ÊÍ
Ctrl+5         & ......

python rss½âÎöÓëÉú³É

 PyRSS2Gen £ºrssÉú³É 
ÏÂÔØµØÖ·£ºhttp://www.dalkescientific.com/Python/PyRSS2Gen-1.0.0.tar.gz 
Àý×Ó£º
Java´úÂë 
import datetime  
import PyRSS2Gen  
  
rss = PyRSS2Gen.RSS2(  
   title = " ......

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£¬ÎÒÃÇ¿ÉÒÔÔÚÉ豸Éϱàд½Å±¾²¢Ö´ÐС£
ËäÈ»ÏÖÔÚÒѾ­Ó¿ÏÖ³öÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ