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

python Eric µÄʹÓÃ

        ×î½üʹÓÃpython¹ý³ÌÖУ¬python½çÃæµÄ±à³Ì¹¤¾ßGTK-Python£¬µ«ÊǽçÃæµÄÃÀ¹ÛÐÔ²»ÈçQt-CreatorÖеÄQt-Designer£¬ÎÞ·¨ÊµÏÖÉè¼ÆÊÇÊÓͼ»æÖÆ£¬ÓеãÈÃÈËʧÍû¡£
        ÍøÉÏ·¢ÏÖÓÐÈ˽éÉÜpython Eric IDE,±È½ÏºÃÆ棬°²×°ÉÏ¿´¿´°É£º
       #yum install eric4
        µ«ÊÇн¨µÄ¹¤³ÌÎÞ·¨run,˵ȱÉÙpyuic4£¬ÓÚÊÇ°²×°ÉÏ¿ª·¢°ü
        #yum install PyQt4-devel
        ÒòΪ֮ǰÎÒ°´×°ÁËqt4.7Àà¿â£¬ËùÒÔÒ»Çж¼ÄÇô˳Æä×ÔÈ»£¬Ð½¨ÁËÒ»¸ö¶Ô»°¿ò£¬ÒòΪpython eric ÖÐǶÈëÁËQt -Designer¹¤¾ß£¬ËùÒÔ»æÖƵĴ°¿Ú±È½ÏÃÀ¹Û£¬Éϵµ´Î£¬ºÇºÇ£¬²»´í£¬±£´æuntitled.uiÎļþ£¬¹Ø±Õdesigner´°¿Ú£¬»Øµ½eric IDE ´°¿Ú·¢ÏÖÔÚsourceÊÓͼ϶àÁËÒ»¸öUi_untitled.pyÎļþ£º
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/fedora11/myPro/eric/untitled.ui'
#
# Created: Mon Mar 8 11:00:42 2010
# by: PyQt4 UI code generator 4.7
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(334, 170)
self.heyButton = QtGui.QPushButton(Dialog)
self.heyButton.setGeometry(QtCore.QRect(60, 100, 85, 27))
self.heyButton.setObjectName("heyButton")
self.pushButton_2 = QtGui.QPushButton(Dialog)
self.pushButton_2.setGeometry(QtCore.QRect(200, 100, 85, 27))
self.pushButton_2.setObjectName("pushButton_2")
self.lineEdit = QtGui.QLineEdit(Dialog)
self.lineEdit.setGeometry(QtCore.QRect(90, 30, 151, 24))
self.lineEdit.setObjectName("lineEdit")
self.dial = QtGui.QDial(Dialog)
self.dial.setGeometry(QtCore.QRect(150, 60, 50, 64))
self.dial.setObjectName("dial")
self.retranslateUi(Dialog)
QtCore.QObje


Ïà¹ØÎĵµ£º

Pyke ¼ò½é (3) £ºµ÷ÖÆ Python º¯Êý

¶Ô Python º¯ÊýµÄ"µ÷ÖÆ"£¬ÊÇÖ¸¶ÔÆä×ö³öºÏºõÐèÇóµÄÉèÖ᣾ßÌåµÄµ÷ÖÆ·½·¨£¬Êǽ«Æä²ÎÊýÉèΪ¹Ì¶¨Öµ£¨³£Êý£©¡£
É趨µ¥Ò»µÄ²ÎÊýÖµ
Ô­Ïȵĺ¯ÊýÊÇÕâÑùµÄ£º
>>> def foo(cooked, standard):
... print "foo called with cooked: %s, standard: %s" % \
... (cooked, standard) 
µ÷ÓÃËü£º
>>> foo('a', ......

python Êý×飬ÐòÁУ¬×ֵ䣬ÁÐ±í£¬Ðò±í£¬Ôª×棨tuple£©

python ûÓÐÊý×éµÄÊý¾Ý½á¹¹
#list ÐòÁÐ
sample_list = [1,2,3,'abc']
#dictionary ×Öµä
sample_dic = {"key":value, 2:3}
#tuple Ö»¶ÁµÄÐòÁÐ
sample_tuple = (1,3,"ab")
Ðò±í
    Ðò±íÓÉһϵÁÐÖµÓöººÅ·Ö¸ô¶ø³É
    Ðò±íÓë×Ö·û´®Ò»ÑùÊDz»¿É±äµÄ£º²»ÔÊÐí¶ÔÐ ......

pythonÁбíºÍ×ÖµäµÄ·½·¨×ܽá

ÁÐ±í·½·¨£º


·½·¨
˵Ã÷
append( item )
ÔÚÁбíĩβ²åÈ루item £©
count( element )
·µ»ØelementÔÚÁбíÖгöÏֵĴÎÊý
extend( newlist )
½«newlistµÄÔªËزåÈëÁбíĩβ
index( element )
·µ»ØelementÔÚÁбíÖеÄË÷Òý£¬Èç¹û²»´æÔÚ£¬ÔòÒý·¢ValueErrorÒì³£
insert( index , item )
ÔÚindex ......

python°²×°Ö®setuptools

David ÔÚ±¾ÎÄÖн«´øÁìÎÒÃÇÁ˽âһϠsetuptools ¿ò¼Ü£¬ËüÊÇ Python Enterprise Application Kit£¨PEAK£©µÄÒ»¸ö¸±ÏîÄ¿¡£ setuptools Ìæ»»Á˱ê×¼µÄ distutils ¿â£¬²¢Îª Python Ìí¼ÓÁË°æ±¾»¯µÄ°üºÍÒÀÀµÐÔ¹ÜÀí¡£Perl Óû§±È½ÏÊìϤ CPAN£¬¶ø Ruby Óû§Ôò±È½ÏÊìϤ Gems£»Òýµ¼ setuptools µÄ ez_setup ¹¤¾ßºÍËæÖ®¶øÉúµÄÀ©Õ¹ºóµÄ eas ......

python31ÓëC½»»¥

1.cµ÷ÓÃpython:
   ÊµÀý´úÂ룺
main.cµ÷ÓÃtest.pyµÄ
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//main.c
#include <windows.h>
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ