|
|
- ¤¤Á¯¬O¤@®M°ò©ó Python §YĶ»y¨¥ 2.1.3 ª©ªº¤¤¤å½sµ{»y¨¥. °£¤F«O¯d¦r, ÅܼƦWºÙ¥i¥Î¤¤¤å¥~, «Ü¦h¤º«Ø¼Æ¾Ú«¬ªº¾Þ§@³£¥i¥Î¤¤¤å¨Ó¶i¦æ.
- ¤¤Á¯¥[¤J¤F¹ï¤¤¤å¦r½s½Xªº¤º³¡¤ä´©, ²{¦b¥i¥H¶¶§Q¹B¦æ©ó¤j¤¤Î°ê¼Ð½s½Xªº¤¤¤å¨t²Î¤¤. ¦P®É¥Î³o¨âºØ½s½X¨t²Î©Ò¼gªºµ{¦¡¤£¥²¶i¦æ½s½XÂà´«¥i¤À¨É¦@¥Î.
- ¥Ñ©ó Python »y¨¥ªºµo®i¤w¬Û·í¦¨¼ô, ¤]¦³³\¦h²Ä¤T¤èÂX®i¼Ò²Õ¼sªx¬y³qµÛ, §¹¥þ¤¤¤å¤Æ±N·|¬O¤@ӫܯE¤jªº¤uµ{. ´£¦ÄÀ¥Xª©¥»¬O¬°¤FÅý§ó¦h¦³¿³½ìªº¤H¥[¤J§Ú̪º¦æ¦C, ¶i¦æ³o¶µ¦³½ìªº¤u§@.
- ¤¤Á¯Ý®e Python 2.1.3 ªºµ{¦¡, ¦]¦¹¤j¶qªºÂX®i¼Ò²Õ¥i¥Hª½±µ®³¨Ó¨Ï¥Î.
- ¤¤Á¯©M Python 2.1.3 ¦P¼Ë, ¬O¶}©ñ·½½Xªº.
- ¶i¨Óª±§a, ³£¬O§Aªº¤F.
|
¤¤Á¯¹q¶l¦Cªí
¤¤Á¯·sªº¶}µoºôµ¸¦ì©ó
¤¤Á¯¦b¦@³Ð³n·ùªº¥D¶
¤¤Á¯Âªº¶}µoºôµ¸¦ì©ó SourceForge . ¦b¨ºùØ¥i¥H§ä¨ì¥H¤U¤º®e:
¤¤Á¯Â²¤¶
1. ¤°¤\¬O¤¤Á¯ ?
¤¤Á¯¥i¥Hºâ¬O Python ½sµ{»y¨¥ªº¤@Ó¤¤¤å½Ķª©¡C ¤£¹L°£¤F¥Î¤á«H®§, ¤¤Á¯ÁÙ½Ķ¤F Python ªº«O¯d¦r, ¤º«Ø¨ç¼Æ, Ãþ§O©w¸qµ¥µ¥¡C ¤]´N¬O»¡, ¦b¤@¯ë±¡ªp¤U, §A¥i¥H¥Î¯Â¤¤¤å¥y¤l¨Ó½s¼g Python µ{¦¡¡C
2. ¯àµ¹Ó¨Ò¤l¶Ü ?
°²³]^¤å Python ªºµ{¦¡¬O³o¼Ëªº (×¥¿¤åÀɤ¤ªº´«¦æ²Å¸¹):
<blockquote><pre>
import sys
filenames = sys.argv[1:]
def fixline(filename):
text = open(filename).read()
text = text.replace('\n\r','\n')
return text
for file in filenames:
print fixline(file)
</pre></blockquote>
³o¬qµ{¦¡¥Î¤¤Á¯¨Ó¼g¬Ý°_¨Ó¹³³o¼Ë:
<blockquote><pre>
¸ü¤J ¨t²Î
¤å¥ó¦W = ¨t²Î.°Ñ¼Æ[1:]
©w¸q ×¥¿¦æ§À(¤å¥ó):
¤º¤å = ¥´¶}(¤å¥ó¦W).Ū¤J()
¤º¤å = ¤º¤å.´À´«('\n\r','\n')
¶Ç¦^ ¤º¤å
¨ú ¤å¥ó ¦Û ¤å¥ó¦W:
¼g ×¥¿¦æ§À(¤å¥ó)
</pre></blockquote>
3. ¬°¤°¤\n°µ¤¤Á¯ ?
¤@¤j³¡¤Àì¦]¬O¬°¤F±À¼s¹q¸£±Ð¨|¡C ¤¤Á¯ªº¹ï¶H¬O¹q¸£½sµ{ªºªì¾ÇªÌ¡B ¹ï½sµ{·§©À¤£¤F¸Ñªº¤H¥H¤Î¤£¥´ºâ¥Hµ{§Çû¬°Â¾·~ªº¤H¡C ¹ï³o¨Ç¤H¨Ó»¡, ¯à¥Î¤¤¤å¨Ó¾Ç²ß¦}§¹¦¨Â²³æªº½sµ{¤u§@¬O¤@¥ó«Ü¤£¿ùªº¨Æ¡C
¤]³\§A·|»{¬°^¤å¬O¹q¸£ªº¼Ðã»y¨¥, n¾Ç¹q¸£´Nn¾Ç^¤å, ¦]¦¹¤£¥²¬°¤F¨º¨Ç¤S·Q¾Ç½sµ{¦ý¤S¤£·Q¾Ç^¤åªºÃi°¾Þ¤ß¡C ¦ý§Ú·Q«ü¥X¾Ç^¤å¬Onªº¡A¦ý³Ì¦n§O±q¹q¸£µ{¦¡¤¤¨Ó¾Ç, ¦]¬°½sµ{»y¨¥©M^¤å¦ÛµM»y¨¥«Ü¤£¤@¼Ë¡C ¹ï¤_^¤å°ò¦¤£¦nªº¤JªùªÌ¨Ó»¡, ¥H¤¤¤å¶i¦æ¾Ç²ß¥i¥H±Mª`¤_½sµ{ªº·§©À, ±`¥Îªººâªk, µ{§ÇªºÅÞ¿è³o¨ÇªF¦è¡C ´Nºâ¥L¥H¦Z¦A¤]¤£¸I¹q¸£µ{¦¡, °_½X¥L¾Ç·|¤F¤@¨Ç¸Ñ¨M§xÃøªº«ä¦Ò¤èªk¦Ó¤£¬O¹³²{¦b³o¼Ë¥u¾Ç¤F¤@°ï @var fscanf() public virtual friend (double)** struct $v->cast[[$$key]] ²ö¦W¨ä§®ªºªF¦è¡C
4. ¬°¤°¤\n¥Î¤¤Á¯ ?
¥Ñ¤_¤¤Á¯©M Python °ò¥»¤W¬O¬Û®eªº, ´Nºâ¤W±^¤åª©ªºµ{¦¡¤]¥i¥H¦b¤¤Á¯¤¤¹B¦æµL»~¡C sys ¼Ò²Õ, ^¤åì¨Óªº¨ç¼Æµ¥³£¨ÌµM«O¯d¦b¤¤Á¯¤§¤º¡C ¦pªG§A»{¬°¥Î¤¤¤å¼gµ{¦¡·|¥O§A«ÜÀYµhªº¸Ü, ¤j¥i¥H·í³o¨Ç¤¤¤å¥\¯à¤£¦s¦b¦n¤F, ¨º¤¤Á¯¥u¤£¹L¬O "º~¤Æ" ¤Fªº Python ¦Ó¤w¡C
5. ¤¤Á¯¬Oקï¦ÛþÓ Python ªºª©¥», ¥L̬O¬Û®eªº¶Ü ?
¤¤Á¯×§ï¦Û Python 2.1.1¡C Python ªºµ{¦¡¥i¥H¦b¤¤Á¯¹B¦æ, ¦ý¥Î¤¤Á¯©Ò¼gªºµ{¦¡¦pªG·í¤¤¦³¤¤¤åªº«ü¥O´N¦A¤£¯à¦b Python ¤¤¹B¦æ¤F¡C
6. ¬°¤°¤\¿ï¤W¤F Python ?
Python µ{¦¡ªº¥yªk¤Q¤À²M´·, ´Nºâ¬O½¦¨¤F¤¤¤å¤§¦Z¥¦É¬¶®ªº·®æ¨ÌµM¤£ÅÜ¡C Python ¬O°ª¶¥ªº, §YĶ¦¡ªº, ±¦V¹ï¶Hªº»y¨¥¡C ¥¦¦³«Ü¦h°ª¯Åªº¤º«Ø¼ÆÕu§ÎºA, «D±`±j¤jªº¼Ðã¼Ò²Õ®w©M¼Æ¥H¦ÊpªºÂX®i¼Ò²Õ¡C §â Python ²¾´Ó¦¨¤¤¤å, ©Ò¦³³o¨Ç³£¥i¥H«¥Î¡C
7. ¬°¤°¤\¤£°µ ¤¤¤åRuby, ¤¤¤åPerl, ¤¤¤åPHP ?
³o©M Python ªº½sµ{®æ¦¡¦³«Ü¤jÃö¨t¡C Python ªºµ{¦¡¬O¥ÎÁY±Æ¨Ó¤À¬qªº, ¦]¦¹¨S¦³¤Fªá¬A¸¹ '{}', ³o¥Oµ{¦¡½X²Å¦X¤é±`»yªº¼g§@²ßºD, ¥[¤J¤F¤¤¤å¦Zµ{¦¡¤@¼Ë²³æ©ö©ú¡C ¦]¬°¤¤Á¯ªº¥Dn¥Øªº¬O±Ð¾Ç¥Î, ²M·¡ªº¥yªkn¤ñ³t«×, ±¦V¹ï¶Hªº¯Â¥¿«×, µ{¦¡ªí¹Fªº±K«×µ¥³£¨Óªº«n¡C ¥ú¬O³oÂI´N§_¨M Perl/C/Java/PHP/.... µ¥¤@¤j°ï»y¨¥¡C §Ú¥»¤H¯S§O¤£³ßÅw Perl ªº¨ºÏú«÷©R¥Î¯S®í¼ÐÂI²Å¸¹§@¬°µ{¦¡·t¸¹ªº°µªk, ³o¼Ë¥u·|À~§¥¤F§Ṳ́@¸s¤Ñ¯uµL¨¸ªºµæ³¾Ì¡C
8. ¤¤Á¯¹B¦æ¤_þ¨Ç¾Þ§@¥¥x¤W ?
¼È®É¸Õ¹L Linux (³o¤j·§ªí¥Ü©Ò¦³¸Ë¤F gcc ªº *nix ¨t²Î) ©M windows¡C ¨ä¥Lªº¹³ Mac, BeOS, RISCOS µ¥«h¨S¦³¡C
9. ¤¤Á¯ªºª©Åv¬°¦ó ?
¤¤Á¯¥Îªº¬O Python License, ¬O¶}©ñ·½½Xªº³n¥ó¡C
10. ·sª©¦³þ¨Ç§ï¨} ? ¦ó³B¤U¸ü ? §Ú·QÀ°¦£¥i¥H¶Ü ?
½Ð¨ì¤¤Á¯ªº¥D¶°ÑÆ[¡C http://www.chinesepython.org |
|
|