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

PythonÖÐÓÐȤµÄ±äÁ¿¸³Öµ

PythonÓïÑÔÖУ¬Á¬±äÁ¿ºÍËüµÄ¸³Öµ¶¼ÊǺÜÓÐÒâ˼µÄÊÂÇé¡£
ÄãÖ»ÐèÒªÔÚʹÓÃËüµÄʱºòÈÓ¸øËüÒ»¸öÖµ£¬È»ºóÔÚËüµÄ×÷ÓÃÓòÄÚʹÓÃËü¡£ÆäËûµÄÊÂÇé²»ÐèÒªµ£ÐÄ¡£python½âÊÍÆ÷»áÍê³ÉʣϵÄÊÂÇé¡£
1. >>>x = 1
2. >>>x
3. 1
4. >>>
µ±È»Ä㻹¿ÉÒÔÏÔʽµÄɾ³ýËü£¬µ«ÔÚÕâÖ®ºóÄã¾Í²»ÄÜÔÙÒýÓÃÕâ¸ö±äÁ¿ÁË
1. >>>del x
2. >>>x
3. Traceback (most recent call last):
4. File "<stdin>", line 1, in <module>
5. NameError: name 'x' is not defined
6. >>>
ÏÂÃæÀ´¿´Ð©ÓÐÒâ˼µÄÊÂÇ飺Á¬ÐøÖµ¸³Öµ
Á¬Ðø¸³ÖµÀý1
1. >>> x,y,z = 1,2,3
2. >>> x
3. 1
4. >>> y
5. 2
6. >>> z
7. 3
Á¬Ðø¸³ÖµÀý2
1. >>> v = (11,22,33)
2. >>> a,b,c = v
3. >>> a
4. 11
5. >>> b
6. 22
7. >>> c
8. 33
9. >>>
Á¬Ðø¸³ÖµÀý3
1. >>> (MON,TUES,WED,THURS,FRI,SAT,SUN) = range(7)
2. >>> MON
3. 0
4. >>> TUES
5. 1
6. >>> WED
7. 2
8. >>>
ÔõôÑù£¬ÊDz»ÊǺÜÓÐÒâ˼£¿µ±È»£¬±äÁ¿µÄÖµ¿ÉÒÔÊÇ list, dict, tuple »òÕßÀàµÄʵÀý£¬ÒÔ¼°ÈκÎÄãÄÜÏëµ½µÄÊý¾ÝÀàÐÍ¡£
À´¸öº¯Êý¶ÔÏóµÄ¸³Öµ£º
1. >>> f1 = lambda x:x*2
2. >>> f2 = lambda y:y*3
3. >>> flist = (f1,f2)
4. >>> v1,v2 = flist
5. >>> v1(2)
6. 4
7. >>> v2(2)
8. 6
9. >>>
±¾ÎÄÀ´×ÔPython°É
£¬»¶Ó­×ªÔØ£¬µ«ÇëÎޱȱ£ÁôÎÒÕ¾Á´½Ó¡£Ð»Ð»£¡


Ïà¹ØÎĵµ£º

python socket server ²¢·¢£¨×ª£©

import SocketServer, time, select, sys
from threading import Thread
COMMAND_HELLO = 1
COMMAND_QUIT = 2
# The SimpleRequestHandler class uses this to parse command lines.
class SimpleCommandProcessor:
    def __init__(self):
        pass
  ......

Ó¦ÓÃpython±àдshell½Å±¾

×ªÔØ×Ô
http://blog.163.com/skynjl/blog/static/603053922009127101558356/
 
 
½ñÌìͬʽÐÎÒ±àдһ¸öshell½Å±¾¡£»°Ëµ£¬ËäÈ»ÎÒÊÜ*nixµÄÓ°ÏìÉõÉµ«ÊǶÔÓÚ*nix ÀïËæ´¦¿É¼ûµÄsh½Å±¾È´ÊÇÌÖÑáÖ®¼«¡£ÎªÊ²Ã´ÌÖÑáÄØ£¿Ê×ÏÈÊÇÒòΪsh½Å±¾ÄÇĪÃûÆäÃîµÄÓï·¨£¬¸Ð¾õ¾ÍÏñËæÐ´ËæÈӵijÌÐò£¬ÍêȫûÓÐÈκÎÃÀ¸Ð¿ÉÑÔ¡£Æä´ÎÊÇsh½Å ......

Python3ÔÚubuntu»·¾³Ïµİ²×°

       Ê×ÏÈÏÂÔØ×îа汾µÄPython£¬ÔÚÕâÀïÎҵİ汾ÊÇPython3.1.1¡£È»ºó¾ÍÊǰ²×°£¬Çл»µ½PythonµÄÎļþĿ¼Ï£º
./configure
make
make test
sudo make install
      ÔÚÕâÀï¿ÉÄÜ»áÓöµ½¼¸¸öÎÊÌ⣬µÚÒ»¸öÊÇÔÚ./configureʱ£¬¿ÉÄÜ»á³öÏÖC compiler cannot create ......

PythonµÄC/C++À©Õ¹

  Python
µÄ
C/C++
À©Õ¹
                         
By phidoit@gmail.com
 
¿ÉÀ©Õ¹ÐÔÊÇ
Python
µÄÒ»´óÌØÉ«£¬Ò»·½Ã棬ÓÉÓÚ
Python
ÊǽâÊÍÖ´Ðеģ¬Õâµ¼ÖÂÔËÐÐËÙ ......

python_ÀàÐͺͶÔÏó


Python ³ÌÐòÖеÄÒ»ÇÐÊý¾Ý¶¼ÊǶÔÏó¡£¶ÔÏó°üÀ¨×Ô¶¨Òå¶ÔÏó¼°»ù±¾µÄÊý¾ÝÀàÐÍÈçÊýÖµ¡¢×Ö·û´®¡¢ÁÐ±í¡¢×ÖµäµÈ¡£ÄãÄܹ»ÒÔÀà»òÀ©Õ¹ÀàÐ͵ķ½Ê½´´½¨×Ô¶¨Òå¶ÔÏó¡£±¾ÕÂÖ÷ÒªÃèÊö Python¶ÔÏóÄ£Ðͼ°µÚËÄÕÂ--ÔËËã·ûÓë±í´ïʽÖÐÒªÓõ½µÄһЩԤ±¸ÖªÊ¶¡£
 
1.1. ÊõÓï
³ÌÐòÖеÄÒ»ÇÐÊý¾Ý¶¼ÊǶÔÏó£¬Ã¿¸ö¶ÔÏó¶¼ÓÐÈý¸ö»ù±¾ÊôÐÔ£¬¼´±êʶ(ÀàË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ