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

Python ×Ö·û´®·½·¨


 
Python-String-Function
×Ö·û´®ÖÐ×Ö·û´óСдµÄ±ä»»£º
    * S.lower()   #Сд
    * S.upper()   #´óд
    * S.swapcase()   #´óСд»¥»»
    * S.capitalize()   #Ê××Öĸ´óд
    * String.capwords(S)
      #ÕâÊÇÄ£¿éÖеķ½·¨¡£Ëü°ÑSÓÃsplit()º¯Êý·Ö¿ª£¬È»ºóÓÃcapitalize()°ÑÊ××Öĸ±ä³É´óд£¬×îºóÓÃjoin()ºÏ²¢µ½Ò»Æð
    * S.title()    #Ö»ÓÐÊ××Öĸ´óд£¬ÆäÓàΪСд£¬Ä£¿éÖÐûÓÐÕâ¸ö·½·¨
×Ö·û´®ÔÚÊä³öʱµÄ¶ÔÆë£º
    * S.ljust(width,[fillchar])
      #Êä³öwidth¸ö×Ö·û£¬S×ó¶ÔÆë£¬²»×㲿·ÖÓÃfillcharÌî³ä£¬Ä¬ÈϵÄΪ¿Õ¸ñ¡£
    * S.rjust(width,[fillchar])    #ÓÒ¶ÔÆë
    * S.center(width, [fillchar])    #Öмä¶ÔÆë
    * S.zfill(width)   #°ÑS±ä³Éwidth³¤£¬²¢ÔÚÓÒ¶ÔÆë£¬²»×㲿·ÖÓÃ0²¹×ã
×Ö·û´®ÖеÄËÑË÷ºÍÌæ»»£º
    * S.find(substr, [start, [end]])
      #·µ»ØSÖгöÏÖsubstrµÄµÚÒ»¸ö×ÖĸµÄ±êºÅ£¬Èç¹ûSÖÐûÓÐsubstrÔò·µ»Ø-1¡£startºÍend×÷ÓþÍÏ൱ÓÚÔÚS[start:end]ÖÐËÑË÷
    * S.index(substr, [start, [end]])
      #Óëfind()Ïàͬ£¬Ö»ÊÇÔÚSÖÐûÓÐsubstrʱ£¬»á·µ»ØÒ»¸öÔËÐÐʱ´íÎó
    * S.rfind(substr, [start, [end]])
      #·µ»ØSÖÐ×îºó³öÏÖµÄsubstrµÄµÚÒ»¸ö×ÖĸµÄ±êºÅ£¬Èç¹ûSÖÐûÓÐsubstrÔò·µ»Ø-1£¬Ò²¾ÍÊÇ˵´ÓÓÒ±ßËãÆðµÄµÚÒ»´Î³öÏÖµÄsubstrµÄÊ××Öĸ±êºÅ
    * S.rindex(substr, [start, [end]])
    * S.count(substr, [start, [end]])    #¼ÆËãsubstrÔÚSÖгöÏֵĴÎÊý
    * S.replace(oldstr, newstr, [count])  
      #°ÑSÖеÄoldstarÌæ»»Îªnewstr£¬countÎªÌæ»»´ÎÊý¡£ÕâÊÇÌæ»»µÄͨÓÃÐÎʽ£¬»¹ÓÐһЩº¯Êý½øÐÐÌØÊâ×Ö·ûµÄÌæ»»
    * S.strip([char


Ïà¹ØÎĵµ£º

Python Ï̲߳Ù×÷

ÔÚpythonÖÐÈçºÎ´´½¨Ò»¸öÏ̶߳ÔÏó
Èç¹ûÄãÒª´´½¨Ò»¸öÏ̶߳ÔÏ󣬺ܼòµ¥£¬Ö»ÒªÄãµÄÀà¼Ì³Ðthreading.Thread£¬È»ºóÔÚ__init__ÀïÊ×Ïȵ÷ÓÃthreading.ThreadµÄ__init__·½·¨¼´¿É
import threading
class mythread(threading.Thread):
    def __init__(self, threadname):
      & ......

µÚÒ»´ÎдÍêÕûµÄPython GUI³ÌÐò

 Ò¹ÀïÓÃÍâ¹ÒÈÝÒ×±»²é£¬Òò´ËÏëÈòËÊìµÄʱ¼ä¼¯Öе½°×Ì죬ÿ´Î¶¼Òª¿ÚË㣬Âé·³£¬ÕýºÃ¸Õ¸ÕѧÁËwxPython£¬Ò»Ê±ÊÖÑ÷£¬À´×Ô¼ºÐ´¸ö°É¡£Ëä˵´¿Êô×ÔÓé×ÔÀÖ£¬µ«Ò²Ñ§µ½²»ÉÙ¶«Î÷¡£ÏÖ¼ÇÓÚÏ¡£
1. ¹ØÓÚPythonµÄGUIÉè¼Æ
Ò»Ö±ÒÔÀ´¶¼Ã»ÓÐÒ»¸ö×ã¹»ºÃµÄKiller IDE£¬ÕâÒ²¹Ö²»µÃ£¬Ã»ÓÐÒ»¸ö×㹻ǿ´óµÄºǫ́£¬ÒªÏë×ö³ÉÖØÁ¿¼¶µÄIDE̸ºÎÈÝÒ×£¨ÒªÊ ......

Python Ï̳߳Ø


import Queue, threading, sys
from threading import Thread
import time,urllib
# working thread
class Worker(Thread):
   worker_count = 0
   def __init__( self, workQueue, resultQueue, timeout = 0, **kwds):
       Thread.__init__( self, **kwds ) ......

eat python 003

Documentation for C's fopen():
---
r Open text file for reading. The stream is positioned at the beginning
of the file.
r+ Open for reading and writing. The stream is positioned at the
beginning of the file.
w Truncate file to zero length or create text file for writing. The
stream is posi ......

Eclipse+PyDev = Python±à¼­Æ÷£¬

http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-pydev/Á¬½ÓÕâ¸öÍøÖ·£¬²»»áÈÃÄãʧÍûµÄ¡£
PyDev ¼ò½é
2003Äê7ÔÂ16ÈÕ£¬ÒÔ Fabio Zadrozny ΪÊ×µÄÈýÈË¿ª·¢Ð¡×éÔÚÈ«Çò×î´óµÄ¿ª·ÅÔ´´úÂëÈí¼þ¿ª·¢Æ½Ì¨ºÍ²Ö¿â SourceForge ÉÏ×¢²áÁËÒ»¿îеÄÏîÄ¿£¬¸ÃÏîĿʵÏÖÁËÒ»¸ö¹¦ÄÜÇ¿´óµÄ Eclipse²å¼þ£¬Óû§¿ÉÒÔÍêÈ«ÀûÓà Eclipse À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ