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

PythonÖеĵ¥Ôª²âÊÔ

   ½ñÍíÊÔÁËÒ»ÏÂPython×Ô´øµÄµ¥Ôª²âÊÔ£¬Ö÷ÒªÊDzο¼ÁËPythonµ¥Ôª²âÊÔ¿ò¼Ü
µÄÓйØ×ÊÁÏ£¬ÕÛÌÚÁËÒ»¸öСʱ×óÓÒ£¬×ÜËãÔÚEric 4ͨ¹ýµÄ¼¸¸ö¼òµ¥µÄµ¥Ôª²âÊÔ¡£ÔÚÕâÀォËùµÃµÄÏà¹Ø֪ʶ¼Ç¼ÏÂÀ´£¬·½±ã½«À´²éѯ¡£
    python×Ô´øµÄµ¥Ôª²âÊÔÄ£¿éÊÇunittest£¬´Ó2.1ÒÔºóΪ±ê×¼¿âµÄÒ»²¿·Ö
    1¡¢²âÊÔÄ£¿éimport unittest
    2¡¢´Óunittest.TestCaseÅÉÉú×Ô¼ºµÄ²âÊÔÀà
    3¡¢ÔÚ²âÊÔÀàÖж¨Òå runTest·½·¨£¬Ôڸ÷½·¨Öбàд²âÊÔÓï¾ä£¬²¢ÓöÏÑÔÅжϲâÊÔÊÇ·ñͨ¹ý¡£
    4¡¢Ê¹ÓÃunittestÄ£¿éµÄmain()·½·¨¿ÉÒÔ½«²âÊÔÄ£¿é±ä³É¿ÉÔËÐеĽű¾£¬Í¨¹ýÏÂÁÐÓï¾ä£¬¿ÉÒÔÔÚÃüÁîÐÐÖ±½ÓÔËÐвâÊÔÄ£¿é
if __name__ == "__main__":
unittest.main()
        ²âÊÔ½á¹û½«Êä³öµ½±ê×¼Êä³ö¡£
    5¡¢ÔÚEric 4ÖУ¬Ñ¡Ôñ‘µ¥Ôª²âÊÔ’->‘µ¥Ôª²âÊÔ’->Ñ¡Ôñ²âÊÔÄ£¿é->µã'¿ªÊ¼'£¬ÔËÐÐÖ¸¶¨µÄ²âÊÔÄ£¿é¡£Í¨¹ýµÄºÍʧ°ÜµÄ²âÊÔ½«·Ö±ðÔÚ²»Í¬µÄÁбíÖÐÁгö£¬Í¬Í¬Ê±»áÓò»Í¬µÄÑÕÉ«±íʾ²âÊԵĽá¹û¡£


Ïà¹ØÎĵµ£º

Python Á·Ï°2

Éú³ÉÒ»¸öÓÐN¸öÔªËصÄÓÐËæ»úÕûÊýn×é³ÉµÄÁÐ±í£¬ÆäÖÐNºÍÄêµÄÈ¡Öµ·¶Î§ÊÇ£¨1<N<=5£©
ºÍ(0<=n<100)£¬ÏÔʾÕâ¸öÁбíµÄËùÓÐ×Ó¼¯¡£
N¸öÊý×Ö¿ÕÓÐ2en¸ö×Ó¼¯£¬¶ÔÓÚÕâN¸öÊý×ÖÔÚÿ¸ö×Ó¼¯ÖÐÀ´½²ÒªÃ´´æÔÚҪô²»´æÔÚ£¬¿ÉÒÔ²ÉÓÃ×Ó¼¯Ó³ÉäΪ2½øÖƵÄËã·¨¡£
ÀýÈç[a,b]¼¯ºÏµÄ×Ó¼¯£º
¿Õ      ---- &nb ......

pythonϵÄweb¿ª·¢¿ò¼Ü Django,djangoÄ£°åµÄʹÓÃ

Ä£°åÊǼòµ¥µÄÎı¾Îļþ£¬Ëü¿ÉÒÔÊÇhtml¸ñʽ»òÊÇxml,csvµÈ¸ñʽµÄ
Ä£°å°üÀ¨±äÁ¿£¬À¨Ëü»á±»ÖµËùÌæ´úµ±ÔËÐÐʱ£¬ÒÔ¼°±êÇ©Ëü¿ØÖÆÄ£°åµÄÂß¼­ÔËËãÈçif,elseµÈ
ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄÄ£°å£¬ÎÒÃǽ«»á¶ÔËü×öÏêϸµÄ˵Ã÷
{% extends "base_generic.html" %}
{% block title %}{{ section.title }}{% endblock %}
{% block content %}
< ......

pythonϵÄweb¿ª·¢¿ò¼Ü Django,´´½¨ÏîÄ¿

½âѹdjango£¬È»ºóµ½ÆäĿ¼Ï°²×°
Ç°ÌáÊÇÄã°²×°ºÃpython.²¢½«ÆäÅäÖõ½»·¾³±äÁ¿ÖУ¬È»ºóÈ¥djangoµÄѹËõÎÄÐÞµÄÏ£¬Ö´ÐÐÒÔϵ¹ÃüÁî
python setup.py install
1.´´½¨project
Ê×ÏÈÎÒÃÇ´ò¿ªcmd, ¶¨Î»µ½Ï£Íûн¨¹¤³ÌµÄĿ¼ÏÂ, ÈÎÒâĿ¼¾ù¿É. È»ºó¼üÈëÈçÏÂÃüÁî:
django-admin.py startproject helloÆäÖÐhelloΪй¤³ÌĿ¼ÎļþÃû ......

pythonµÄ±Õ°ü(3.0֮ǰ¼°Ö®ºó)

Ê×ÏÈ, ˵˵pythonÀïÃæµÄ±Õ°ü°É:
1. ÐèÒªº¯ÊýǶÌ×, ¾ÍÊÇÒ»¸öº¯ÊýÀïÃæÔÙдһ¸öº¯Êý.
2. Íⲿº¯ÊýÐèÒª·µ»ØÒ»¸öÄÚ²¿º¯ÊýµÄÒýÓÃ
3. Íⲿº¯ÊýÖÐÓÐһЩ¾Ö²¿±äÁ¿, ²¢ÇÒ, ÕâЩ¾Ö²¿±äÁ¿ÔÚÄÚ²¿º¯ÊýÖÐÓÐʹÓÃ
¸ÅÄî:
1. ×ÔÓɱäÁ¿: Íⲿº¯ÊýÖж¨ÒåµÄ¾Ö²¿±äÁ¿, ²¢ÇÒÔÚÄÚ²¿º¯ÊýÖб»Ê¹ÓÃ.
2. ±Õ°ü: ÄǸöʹÓÃÁË×ÔÓɱäÁ¿²¢±»·µ»ØµÄÄÚ²¿º¯Ê ......

ת¶ÎPython´úÂë

#==================================================
import wx
import wx.media

class MyFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self,parent,-1,title,pos=(150,150),size&;nbsp;=(640, 480),style=wx.MAXIMIZE_BOX|wx.SYSTEM_MENU|wx.CAPTION|wx.CLOSE_BOX| ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ