Why I Love Python 2001 Bruce EckelMindView, Inc.Training & Consulting5343 Valle VistaLa Mesa, CA 91941Bruce@EckelObjects.comwww.MindView.netftp://www.mindview.net/pub/eckel/LovePython.zip
infile = file("infile","r")outfile = file("outfile", "w") for line in infile.readlines(): newline=line.replace("windows","linux") outfile.write(newline)
infile = file("infile.txt","r")outfile = file("outfile.txt", "w") outfile.write(infile.read().replace("windows","linux"))
So, what is pyton?
what is python
Hello World: 1: 1: 1 : 3(@hongqn)
Battery Included: 200+PyPI: 9613 packages currently ///////...easily extensible
Why Python?list,dict,tuple,etc,Linux/Unix,Win,MacgoogleCC++java,c#Open Source,GC,
Who use python?
Who use pythonGoogleYoutubeDoubanDropbox, BitTorrentNASAPlurk
What python can't do?
Python Web and Internet Development django,web.py,zope,etcDatabase Access (odbc,st)Desktop GUIs (QT,gtk,wx,MFC)Scientific and Numeric Education Network Programming Socket,TwistedSoftware Development Game and 3D Graphics (pygame)
Python compared to other languages
Perl PHP HTML Tcl/Tk Java Ruby
Interview with Bruce Eckel by Clay Shannon
Compare and contrast Java, C++, Delphi, Python, and C#--what are the advantages/disadvantages of each?
Saving the best for last, I've said in numerous places that Python is my favorite language, and this is because I'm most productive in that language. I can get so much more done in Python than in any other language I've encountered that it's very hard for me to use those other languages, because to do so means throwing away time. Also, I've found the Python community to be my favorite group of language people; I can't figure out how or why this is the case, but it retains the gentleness and enthusiasm that I most value in my interactions with a language community. I look forward to when I finally get my plate cleared enough that I can continue working on "Thinking in Python."
The zen of python
There is only one way to do it. Everything is object. Readability counts. Explicit is better than implicit. Simple is better than complex.
CPythonClassic PythonPythonCPythonCPythonJythonJPythonJavaPythonPyPyPythonPythonIronPython.NETECMA CLIPythonPython
XmlrpcServer: from SimpleXMLRPCServer import SimpleXMLRPCServer def foo(): return "Hello world!" server = SimpleXMLRPCServer( ("localhost", 8000) ) server.register_function(foo) server.serve_forever()
Client: from xmlrpclib import ServerProxy server = ServerProxy("http://localhost:8000") print server.foo()
Web Server python -m SimpleHTTPServer ,just so simple
PythonIDEIDLEPythonIDEKomodoKomodo EditPythonWinActivePythonIDEWindowsSPEStani's Python EditorwxPythonUlipadwxPythonPythonlimodouWingIDEIDEEricPyQt
IDEeclipse + pydevemacs + Vim + Visual Studio .NET 2003 + VisualPythonWindowsSlickEditTextMate
Google Groups http://groups.google.com/
Life is short,you need python