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

python rss½âÎöÓëÉú³É

 PyRSS2Gen £ºrssÉú³É 
ÏÂÔØµØÖ·£ºhttp://www.dalkescientific.com/Python/PyRSS2Gen-1.0.0.tar.gz 
Àý×Ó£º
Java´úÂë 
import datetime  
import PyRSS2Gen  
  
rss = PyRSS2Gen.RSS2(  
   title = "Andrew's PyRSS2Gen feed",  
   link = "http://www.dalkescientific.com/Python/PyRSS2Gen.html",  
   description = "The latest news about PyRSS2Gen, a "  
                 "Python library for generating RSS2 feeds",  
  
   lastBuildDate = datetime.datetime.now(),  
  
   items = [  
      PyRSS2Gen.RSSItem(  
        title = "PyRSS2Gen-0.0 released",  
        link = "http://www.dalkescientific.com/news/030906-PyRSS2Gen.html",  
        description = "Dalke Scientific today announced PyRSS2Gen-0.0, "  
                      "a library for generating RSS feeds for Python.  ",  
        guid = PyRSS2Gen.Guid("http://www.dalkescientific.com/news/"  
                         "030906-PyRSS2Gen.html"),  
      &n


Ïà¹ØÎĵµ£º

python´¦ÀízipÎļþ£¨×ª£© 2009

 ×ª×Ô http://hi.baidu.com/xunxun129/blog/item/3befad0f8ff992c07bcbe180.html
ÓÐʱÎÒÃÇÐèÒªÔÚ Python
ÖÐʹÓà zip Îļþ£¬¶øÔÚ1.6°æÖУ¬Python ¾ÍÒѾ­ÌṩÁË zipfile Ä£¿é¿ÉÒÔ½øÐÐÕâÑùµÄ²Ù×÷¡£²»¹ý Python ÖеÄ
zipfile Ä£¿é²»ÄÜ´¦Àí¶à¾íµÄÇé¿ö£¬²»¹ýÕâÖÖÇé¿ö²¢²»¶à¼û£¬Òò´ËÔÚͨ³£Çé¿öÏÂÒѾ­×㹻ʹÓÃÁË¡£ÏÂÃæÎÒÖ»Ê ......

python °ïÖúÎĵµ²é¿´

 Õâ¸ö´úÂëÊÇ»ùÓÚpython3.0дµÄ£¬ÓÐÐí¶à²»ÍêÉÆµÄµØ·½£¬Çë×ÔÒÑÐ޸ġ£
# coding: utf-8
from tkinter import *
root = Tk()
root.title("python3.0²éѯ")
#root.minsize(800,600)
#Ìî³äÎÞÓÿռä
Label(root).grid(ipady=5)
#11Ãæ°å
class Frame11:
    def __init__(self, root):   # ......

PythonÖеĶÔÏó¡¢±äÁ¿¼°ÒýÓÃ

  ÔÚPythonÖУ¬ÎÒÃÇÖ´Ðбí´ïʽ a = 3£¬Python»áÔõÑù²Ù×÷ÄØ£¿
1¡¢Ê×ÏȻᴴ½¨Ò»¸ö¶ÔÏó±íʾֵ3
2¡¢Èç¹û±äÁ¿a²»´æÔÚ£¬´´½¨±äÁ¿a
3¡¢°Ñ±äÁ¿aÁ¬½Óµ½±íʾ3µÄ¶ÔÏó
ÔÚPythonÖУ¬±äÁ¿ºÍ¶ÔÏó´æ´¢ÔÚ²»Í¬µÄµØ·½£¬Í¨¹ýÖ¸ÕëÁ¬½ÓÆðÀ´...
Ò»¸ö±äÁ¿×ÜÊǺͶÔÏóÁ¬½ÓÆðÀ´£¬²»´æÔÚ²»ºÍ¶ÔÏóÁ¬½ÓµÄ±äÁ¿£¬µ«ÊÇ´óµÄ¶ÔÏó¿ÉÄÜÁ¬½Óµ½±ðµÄ¶ÔÏó¡£ ......

Python Ö®ìø

import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough t ......

Python¶ÁдÎļþ


PythonÖÐÎļþ²Ù×÷¿ÉÒÔͨ¹ýopenº¯Êý£¬ÕâµÄÈ·ºÜÏñCÓïÑÔÖеÄfopen¡£Í¨¹ýopenº¯Êý»ñȡһ¸öfile object£¬È»ºóµ÷ÓÃread()£¬write()µÈ·½·¨¶ÔÎļþ½øÐжÁд²Ù×÷¡£
1.open
ʹÓÃopen´ò¿ªÎļþºóÒ»¶¨Òª¼ÇµÃµ÷ÓÃÎļþ¶ÔÏóµÄclose()·½·¨¡£±ÈÈç¿ÉÒÔÓÃtry/finallyÓï¾äÀ´È·±£×îºóÄܹرÕÎļþ¡£
file_object = open('thefile.txt' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ