python°²×°Ö®°²×°Ä£¿éÖÆ×÷
pythonµÄeggÎļþÓеãÏñjavaÖеÄjarÎļþ£¬ÊÇÒ»¸ö¹¤³Ì´ò°üÎļþ£¬±ãÓÚ°²×°²¿Ê𣬽ö´ËÒ»µã£¬¸ø¶àÉÙpythoner´øÀ´Á˶àÉÙ¼¤¶¯¡£
ÈçºÎÖÆ×÷eggÎļþÄØ£¿see¹Ù·½Îĵµhttp://peak.telecommunity.com/DevCenter/PythonEggs£¬
µ½http://pypi.python.org/pypi/setuptoolsÏÂÔØsetuptools°ü£¬È»ºó°²×°£º
python setup.py
1.ÖÆ×÷eggÎļþ
ÏÂÃ濪ʼeggÎļþµÄÖÆ×÷£º£¨¼ûÉÏÒ»¸öeggµÄÌû×Ó£¬±È½ÏÏêϸ£©
ÔÚÒª´ò°üµÄÎļþ¼Ð¸¸Ä¿Â¼ÖÐн¨setup.py
#setup.py
view plaincopy to clipboardprint?
#coding=utf8
from setuptools import setup, find_packages
setup(
name = "eggtest",
version = "0.1",
packages = find_packages(),
description = "egg test demo",
long_description = "egg test demo",
author = "lidehong",
author_email = "idehong@gmail.com",
license = "GPL",
keywords = ("test", "egg"),
platforms = "Independant",
url = "http://blog.csdn.net/hong201/",
)
#coding=utf8
from setuptools import setup, find_packages
setup(
name = "eggtest",
version = "0.1",
packages = find_packages(),
description = "egg test demo",
long_description = "egg test demo",
author = "lidehong",
author_email = "idehong@gmail.com",
license = "GPL",
keywords = ("test", "egg"),
platforms = "Independant",
url = "http://blog.csdn.net/hong201/",
)
name£º°üÃû
version£º°æ±¾
packages £º´ò°üµÄÎļþ
description£ºÃèÊöÐÅÏ¢
author£º×÷Õß
url£ºÏÂÔØ
Ïà¹ØÎĵµ£º
²»¶à˵ÁË£¬Ö±½Ó¿´´úÂë°É£¡
import os
path = 'e:/Download/'
kzm = []
kzmTemp = set()
kzmTemp2 = []
dict = {}
for root,dirs,files in os.walk(path):
for file in files:
ext = os.path.splitext(file)[1][1:]
  ......
python ûÓÐÊý×éµÄÊý¾Ý½á¹¹
#list ÐòÁÐ
sample_list = [1,2,3,'abc']
#dictionary ×Öµä
sample_dic = {"key":value, 2:3}
#tuple Ö»¶ÁµÄÐòÁÐ
sample_tuple = (1,3,"ab")
Ðò±í
Ðò±íÓÉһϵÁÐÖµÓöººÅ·Ö¸ô¶ø³É
Ðò±íÓë×Ö·û´®Ò»ÑùÊDz»¿É±äµÄ£º²»ÔÊÐí¶ÔÐ ......
1 Ó°ÏñÓëͼÐÎ×ÊÁϵĴ¦Àí
ÌÖÂÛͼÐÎ(Ó°Ïñ) ±¾ÉíµÄ´¦Àí£¬¶øÌÖÂÛµÄÄÚÈݽ«»á¼¯ÖÐÔÚPython Imaging Library (PIL) ÕâÒ»Ì׳Ìʽ¿âÉÏ¡£
PIL ÊÇPython ÏÂ×îÓÐÃûµÄÓ°Ïñ´¦ÀíÌ×¼þ£¬ÓÉÐí¶à²»Í¬µÄÄ£×éËù×é³É£¬²¢ÇÒÌṩÁËÐí¶àµÄ´¦Àí¹¦ÄÜ£¬ÔÊÐíÎÒÃÇÔÚ¼òµ¥µÄPython ³ÌʽÀï½øÐÐÓ°ÏñµÄ´¦Àí¡£ ʹÓÃÏñPIL ÐíÑùµÄ³Ìʽ¿âÌ ......
PythonÖÐRangeºÍXRangeµÄÇø±ð(Difference between Range and XRange in Python)
×î½ü»úÆ÷³öÁ˵ãÎÊÌ⣬ËùÒÔһֱûÓÐдеĶ«Î÷³öÀ´¡£Ö®Ç°ÔÚ¶ÁPythonµÄ´úÂëµÄʱºò£¬·¢¾õºÃ¶àÈËϲ»¶ÓÃXRange£¬¶ø²»ÊÇRange£¬ÎÒÒ²Ö»ÊǼǵÃѧϰµÄʱºò¿ªÊ¼Ñ§µ½µÄÊÇRange£¬ºóÃæÓÖ¿´µ½ÓиöXRange£¬µ±Ê±Ò²Ã»ÓÐÉ£¬ÎªÊ²Ã´PythonÀïÃæÒªÓÐÁ½¸öͬÑùµÄ¹¦ ......
windowsÏÂ
1 ÏÂÔØpython°²×°°ü£¬ һ·ÏÂÈ¥°²×°
2 ÏÂÔØmysqldb°²×°
3 ÏÂÔØdjangoÎļþ£¬ dyango-admin.py install Íê³É
£££££Èç¹ûÆô¶¯ºó±¨´íimport error: dll load failed. ÐèÒªÔÚsite-packageÏÂÔö¼Ódll: libguide40.dll libmmd.dll libmySQL.dll
´´½¨Ó¦ÓÃºó£¬ manage.py µÄprogram argumentÖÐÓ¦ ......