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

IronPythonÖÐÈçºÎÌí¼ÓPythonÄ£¿é?

IronPythonÖеŦÄÜÌ«ÉÙÁË,ºÜ¶à³£ÓõÄPythonÄ£¿é¶¼Ã»ÓÐ,Ò²¼ÓÉϲ»¡£
»¹µÃÓÃCLRÀ´À©Õ¹¡£
¸ãµ½·½·¨ÁË,ÈçÏÂ:
Python code:

import sys #µ¼Èësys module£»
sys.path.append("c:/Python24/Lib") #Ôö¼ÓËÑË÷·¾¶£¬Ò²¾ÍÊÇ˵µ±importij¸ömoduleµÄʱºò£¬½«»áµ½ÒÑÓеÄËÑË÷·¾¶ÖвéÕÒ£»
import random #µ¼ÈëCPythonÖÐÃûΪrandomµÄmodule£»
random.__doc__ #ÏÔʾģ¿éµÄdocument£»



ÎÊÌâÒѾ­½â¾ö,Òª½áÌûÁË,Ë­»Ø¸´»ý·Ö¾Í¾Í¸øË­


ºÜ¶à¶¼Ã»ÓеÄ,²»ÒªÆæ¹ÖÁË,ÕâÒ²ÊǾٸöÀý×Ó°ÕÁË.
Âé·³µÄÊÇÈç¹û°ÑIronPythonµÄÔ´´úÂëÐÞ¸ÄÁ˺ó,Èç°ÑȱʡÊý×ÖÀàÐ͸ÄΪdecimal,ºÜ¶àCpythonµÄÄ£¿é¾Í²»ÄÜÓÃÁË.

ÕⶫÎ÷»¹Ã»³ÉÊ죬»¹ÔÚ·¢ÓýÖÐ
Èç¹ûÒªÓÃcpythonµÄ¶«Î÷£¬¾Íû¶à´óÒåÒå

ÎÒÓÐÏîÄ¿,ÒªÔÚ.NETÖÐÓÃ,ÓÃIPY¿ÉÒÔ¸ü½ôÃܼ¯³É


Ïà¹ØÎÊ´ð£º

PythonÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ

ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô­³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......

python ͼÏñ¶à±ßÐÎÇиî

pythonµÄPIL¿â×Ô´øµÄ·½·¨Ö»ÄܽøÐоØÐεÄÇиÈç¹ûÎÒÓÐÁËÒ»¸ö¶à±ßÐθ÷¸ö¶¥µãµÄ×ø±ê£¬ÈçºÎ¶ÔÏÖÓеÄͼƬ°´ÕÕÕâ¸ö¶à±ßÐνøÐÐÇиîÄØ£¿
²»Ò»¶¨ÒªÓÃPIL¿â£¬ÈκÎÄÜʵÏÖÕâ¸ö¹¦Äܵķ½·¨¶¼ÐС£

ͼƬÇиîµÄjs²»ÊǺܶàÂð£¿
......

pythonÈçºÎ×¥win32³ÌÐòÖÐlistboxµÄÐÅÏ¢

±ÈÈçÎÒÐèÒªÓÃpython ¶Ôwin32³ÌÐò½øÐÐÒ»¶¨µÄ¿ØÖÆ

¶ÔtextboxÊäÈëÒ»´®×Ö·û´®
°´Ä³¸öbotton

¶ÔlistboxÀïµÄµÄÄÚÈݶÁÈ¡£¬´æ³É×Ö·û´®


¸ÃÈçºÎ²Ù×÷£¿
»òÕßÄÄÀïÓÐÎĵµÀý×Ó£¿

·Ç³£¸Ðл ......

JavaÓëPython»ìºÏµ÷ÓÃÇë½Ì

ÎÒÓÃpython¿ª·¢ÁËÒ»×éGUI½çÃ棬ÁíÍâÒ»¸öͬ־ÓÃjavaʵÏÖÁËÓ¦ÓÃÖ÷¿ò¼Ü£¬ÏÖÔÚÒª½«ÕâЩGUI½çÃ漯³Éµ½Ö÷¿ò¼ÜÀïÃæÈ¥¡£²»ÖªµÀÔÚjavaÀïÃæ¸ÃÈçºÎµ÷Ó㿼ò¶øÑÔÖ®£¬¾ÍÊÇjava´úÂëÀïÃæÈçºÎµ÷ÓÃÒ»¸öÍⲿµÄ.pyÎļþ¡£Çë¸ø³öÒ»¸ö¼òµ¥µ ......

Ë­ÄÜ°ïÎÒ·ÖÎöpython¹ú¼Ê»¯±¨´íÎÊÌâ

´íÎó´úÂëÈçÏ£º
<strong>exceptions.UnicodeEncodeError &lt;br /&gt; &amp;#39;ascii&amp;#39; codec can&amp;#39;t encode characters in position 0-5: ordinal not in range(128)& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ