(python)http://www.python.org/
ÖÐÎļò½é
¡¡¡¡Python (·¢Òô:[ 'paiθ(?)n; (US) 'paiθ?n ]n.òþÉߣ¬¾ÞÉß )£¬ÊÇÒ»ÖÖÃæÏò¶ÔÏóµÄ½âÊÍÐԵļÆËã»ú³ÌÐòÉè¼ÆÓïÑÔ£¬Ò²ÊÇÒ»ÖÖ¹¦ÄÜÇ¿´ó¶øÍêÉÆµÄͨÓÃÐÍÓïÑÔ£¬ÒѾ¾ßÓÐÊ®¶àÄêµÄ·¢Õ¹ÀúÊ·£¬³ÉÊìÇÒÎȶ¨¡£Python ¾ßÓнű¾ÓïÑÔÖÐ×î·á¸»ºÍÇ¿´óµÄÀà¿â£¬×ãÒÔÖ§³Ö¾ø´ó¶àÊýÈÕ³£Ó¦Óá£ËüµÄÃû×ÖÀ´Ô´ÓÚÒ»¸öϲ¾ç,Ò²Ðí×î³õÉè¼ÆPythonÕâÖÖÓïÑÔµÄÈ˲¢Ã»ÓÐÏëµ½½ñÌìPython»áÔÚ¹¤ÒµºÍ¿ÆÑÐÉÏ»ñµÃÈç´Ë¹ã·ºµÄʹÓá£ÖøÃûµÄ×ÔÓÉÈí¼þ×÷ÕßEric RaymondÔÚËûµÄÎÄÕ¡¶ÈçºÎ³ÉΪһÃûºÚ¿Í¡·ÖУ¬½«PythonÁÐΪºÚ¿ÍÓ¦µ±Ñ§Ï°µÄËÄÖÖ±à³ÌÓïÑÔÖ®Ò»£¬²¢½¨ÒéÈËÃÇ´ÓPython¿ªÊ¼Ñ§Ï°±à³Ì¡£ÕâµÄÈ·ÊÇÒ»¸öÖпϵĽ¨Ò飬¶ÔÓÚÄÇЩ´ÓÀ´Ã»ÓÐѧϰ¹ý±à³Ì»òÕß²¢·Ç¼ÆËã»úרҵµÄ±à³ÌѧϰÕß¶øÑÔ£¬PythonÊÇ×îºÃµÄÑ¡ÔñÖ®Ò»¡£
¡¡¡¡
Ó¢Îļò½é
¡¡¡¡Python is an object-oriented explanation of computer programming languages, is a powerful and well-size-fits-all language, has been more than a decade of development, maturity and stability. Python scripting language with the most rich and powerful class library, enough to support the vast majority of day-to-day applications.
¡¡¡¡This language has a very simple and clear characteristics of grammar, for a variety of high-level mission to complete, almost all of the operating system to run.
¡¡¡¡At present, this language is related to the rapid technological development, the rapid expansion of the number of users, and related resources.
¡¡¡¡ÕâÖÖÓïÑÔ¾ßÓзdz£¼ò½Ý¶øÇåÎúµÄÓï·¨ÌØµã£¬ÊʺÏÍê³É¸÷Öָ߲ãÈÎÎñ£¬¼¸ºõ¿ÉÒÔÔÚËùÓеIJÙ×÷ϵͳÖÐÔËÐС£
¡¡¡¡Ä¿Ç°£¬»ùÓÚÕâÖÖÓïÑÔµÄÏà¹Ø¼¼ÊõÕýÔÚ·ÉËٵķ¢Õ¹£¬Óû§ÊýÁ¿¼±¾çÀ©´ó£¬Ïà¹ØµÄ×ÊÔ´·Ç³£¶à¡£
PythonµÄHello World³ÌÐò¡¡
¡¡ÏÂÃæÊÇÒ»¸öÔÚ±ê×¼Êä³öÉ豸ÉÏÊä³öHello WorldµÄ¼òµ¥³ÌÐò£¬ÕâÖÖ³ÌÐòͨ³£×÷Ϊ¿ªÊ¼Ñ§Ï°±à³ÌÓïÑÔʱµÄµÚÒ»¸ö³ÌÐò£º
¡¡¡¡ÔÚpython2.x°æ±¾ÖÐ
¡¡¡¡#!/usr/bin/env python
¡¡¡¡print "Hello, world!"
¡¡¡¡»òÕߣº
¡¡¡¡import sys
¡¡¡¡sys.stdout.write("Hello, world\n")
¡¡¡¡///////
¡¡¡¡ÔÚpython3.xÖÐ
¡¡¡¡printÊÇÒ»¸öÍêÍêȫȫµÄº¯Êý£¬ÐèÒªÐ޸ijɣº
¡¡¡¡print('Hello world!')
Óŵã
¡¡¡¡¼òµ¥————PythonÊÇÒ»ÖÖ´ú±í¼òµ¥Ö÷Òå˼ÏëµÄÓïÑÔ¡£ÔĶÁÒ»¸öÁ¼ºÃµÄPython³ÌÐò¾Í¸Ð¾õÏñÊÇÔÚ¶ÁÓ¢ÓïÒ»Ñù£¬¾¡¹ÜÕâ¸öÓ¢ÓïµÄÒ
Ïà¹ØÎĵµ£º
PythonÖк¯Êý²ÎÊýµÄ´«µÝÊÇͨ¹ý“¸³Öµ”À´´«µÝµÄ¡£µ«ÕâÌõ¹æÔòÖ»»Ø´ðÁ˺¯Êý²ÎÊý´«µÝµÄ“Õ½ÂÔÎÊÌ┣¬²¢Ã»Óлشð“Õ½ÊõÎÊÌ┣¬Ò²¾Í˵ûÓлشðÔõô¸³ÖµµÄÎÊÌâ¡£º¯Êý²ÎÊýµÄʹÓÿÉÒÔ·ÖΪÁ½¸ö·½Ã棬һÊǺ¯Êý²ÎÊýÈçºÎ¶¨Ò壬¶þÊǺ¯ÊýÔÚµ÷ÓÃʱµÄ²ÎÊýÈçºÎ½âÎöµÄ¡£¶øºóÕßÓÖÊÇÓÉǰÕß¾ö¶¨µÄ¡£º¯Êý²ÎÊýµÄ¶¨ ......
PEP 0263
Defining Python Source Code Encodings
Python will default to ASCII as standard encoding if no other
encoding hints are given.
To define a source code encoding, a magic comment must
be placed into the source files either as first or second
line in the file, suc ......
ĿǰΪֹ£¬¾ÝÎÒËùÖª£¬ÔÚpythonÖжÔÏó³Ö¾Ã»¯ÓÐÒÔϼ¸ÖÖ·½·¨£º
1. ʹÓÃ(dbhash/bsddb, dbm, gdbm, dumbdbm µÈ£©ÒÔ¼°ËüÃǵÄ"¹ÜÀíÆ÷"( anydbm )¡£Ö»ÌṩÁË Python ×Ö
·û´®µÄÓÀ¾ÃÐÔ´¢´æ. Ìṩһ¸öÀàËÆ×ÖµäºÍÎļþµÄ¶ÔÏ󣬿ÉÒÔÍê³É×Ö·û´®µÄÓÀ¾ÃÐÔ´æ´¢¡£
2. ʹÓÃmarshalºÍpickleÀ´ÐòÁл¯python¶ÔÏ󣬲¢¾ß±¸´æ´¢µ½½éÖÊÉϵĹ ......
Õâ¸öËãÊÇC++ǶÈëpython°É£¬ÀûÓÃpythonʵÏÖÏÔʾºÍʼþ´¦Àí£¬C++ʵÏÖÂß¼
ÒÔºóÓÐʱ¼äÒ²»á·´¹ýÀ´ÊÔÊÔ£º£©
import pygame
import sys
import os
import ctypes
def cur_file_dir():
#»ñÈ¡½Å±¾Â·¾¶
path = sys.path[0]
#ÅжÏΪ½Å±¾Îļþ»¹ÊÇpy2exe±àÒëºóµÄÎļþ£¬Èç¹ûÊǽű¾Îļþ£¬Ôò·µ»ØµÄÊǽű¾µÄĿ ......
Alex. J. Champandard
ÀµÓºƣ¨http://laiyonghao.com£© Òë
ÔÎĵØÖ·£ºhttp://aigamedev.com/open/interviews/inside-galcon-python-ai/
AiGameDev.comÔÚÕâ¸öÖÜÒ»µÄ pratical insights ÊǶÔPhil Hassey²É·Ã¡£Phil ÊÇÒ»¸ö¶ÀÁ¢ÓÎÏ·¿ª·¢Õߣ¬Ò²ÊÇÓÎÏ·²úÒµÉçÇøµÄ»îÔ¾·Ö×Ó¡£ËûÔøÓ®µÃ2006Äê4Ô嵀 Ludum Dare ±ÈÈü£¨Õâ¸ö±ÈÈü¹Ø×¢ ......