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

Pythonѧϰ±Ê¼ÇÒ»




·¢
Ïֺܶ๫˾ҪÇóÕÆÎÕһÎű¾ÓïÑÔ£¬Ò»Ö±Ò²Ïë¸ã¸ãÕâ¸ö£¬¿´C++£¬Linux
C±à³ÌÒ²Ö»ÊÇΪÁ˶Ôϵͳ¸ü¼ÓµÄÁ˽⣬°¦£¬ÎҵŤ×÷¶¨Î»ºÃÏñÒ»Ö±¶¼²»ÔõôÃ÷È·£¬ÊÇÒª¸ã¸ö×Ô¼º×îÉó¤µÄÁË£¬ÒÔºóÓÐʱ¼äÔÙ¸ãlinuxC£¬ÕÒ¹¤×÷µÚһλ¡£¡£¡£¹¤
×÷»ù±¾¶¨Î»ÔÚ Java+python£¬´ó²¿·Ö¹«Ë¾Ò²²»»áÒªÇóÒ»¸öÈ˼È×öJavaÒ²×öC++¡£ÔÙ˵ÕâÓïÑÔÒ²ÊÇ´óͬСÒ죬¹Ø¼ü»¹ÊDZà³Ì˼Ïë
d = {"server":"mpilgrim", "database":"master"}
li = ["a", "b", "mpilgrim", "z", "example"]
Tuple ÊDz»¿É±äµÄ list¡£Ò»µ©´´½¨ÁËÒ»¸ö tuple£¬¾Í²»ÄÜÒÔÈκη½Ê½¸Ä±äËü
 t = ("a", "b", "mpilgrim", "z", "example")
Á¬½Ó list Óë·Ö¸î×Ö·û´®
>>> li = ['server=mpilgrim', 'uid=sa', 'database=master', 'pwd=secret']
>>> s = ";".join(li)
>>> s
'server=mpilgrim;uid=sa;database=master;pwd=secret'
>>> s.split(";")   
['server=mpilgrim', 'uid=sa', 'database=master', 'pwd=secret']
>>> s.split(";", 1)
['server=mpilgrim', 'uid=sa;database=master;pwd=secret']
ʹÓà type¡¢str¡¢dir ºÍÆäËüÄÚÖú¯Êý
4.3.2. str º¯Êý
str ½«Êý¾ÝÇ¿ÖÆ×ª»»Îª×Ö·û´®¡£Ã¿ÖÖÊý¾ÝÀàÐͶ¼¿ÉÒÔÇ¿ÖÆ×ª»»Îª×Ö·û´®¡£
Àý 4.6. str ½éÉÜ
>>> str(1)         
'1'
>>> horsemen = ['war', 'pestilence', 'famine']
>>> horsemen
['war', 'pestilence', 'famine']
>>> horsemen.append('Powerbuilder')
>>> str(horsemen)  
"['war', 'pestilence', 'famine', 'Powerbuilder']"
>>> str(odbchelper)
"<module 'odbchelper' from 'c:\\docbook\\dip\\py\\odbchelper.py'>"
>>> str(None)      
'None'  ¶ÔÓÚ¼òµ¥µÄÊý¾ÝÀàÐͱÈÈçÕûÐÍ£¬Äã¿ÉÒÔÔ¤Áϵ½ str µÄÕý³£¹¤×÷£¬ÒòΪ¼¸ºõÿÖÖÓïÑÔ¶¼ÓÐÒ»¸ö
½«ÕûÐÍת»¯Îª×Ö·û´®µÄº¯Êý¡£ 
  È»¶ø str ¿ÉÒÔ×÷ÓÃÓÚÈκÎÊý¾ÝÀàÐ͵ÄÈκζÔÏó¡£ÕâÀïËü×÷ÓÃÓÚÒ»¸öÁãËé¹¹½¨µÄÁÐ±í¡£ 
 


Ïà¹ØÎĵµ£º

PythonÄ£¿éѧϰ

¡¡¡¡Python±ê׼ģ¿éÖУ¬Óжà¸öÄ£¿éÓÃÓÚÊý¾ÝµÄѹËõÓë½âѹËõ£¬Èçzipfile£¬gzip, bz2µÈµÈ¡£ÉϴνéÉÜÁËzipfileÄ£¿é£¬½ñÌì¾ÍÀ´½²½²zlibÄ£¿é¡£ zlib.compress(string[, level]) zlib.decompress(string[, wbits[, bufsize]]) ¡¡¡¡zlib.compressÓÃÓÚѹËõÁ÷Êý¾Ý¡£²ÎÊýstringÖ¸¶¨ÁËҪѹËõµÄÊý¾ÝÁ÷£¬²ÎÊýlevelÖ¸¶¨ÁËѹËõµÄ¼¶±ð£¬ËüµÄÈ ......

PythonÖÐSQLiteÊý¾Ý¿âʹÓóõ²½

SQLITEÊÇÒ»¿î·Ç³£Ð¡ÇɵÄǶÈëʽ¿ªÔ´Êý¾Ý¿âÈí¼þ£¬Ò²¾ÍÊÇ˵ûÓжÀÁ¢µÄά»¤½ø³Ì£¬ËùÓеÄά»¤¶¼À´×ÔÓÚ³ÌÐò±¾Éí¡£ËüʹÓÃÒ»¸öÎļþ´æ´¢Õû¸öÊý¾Ý¿â£¬²Ù×÷Ê®·Ö·½±ã¡£ËüµÄ×î´óÓŵãÊÇʹÓ÷½±ã£¬¹¦ÄÜÏà±ÈÓÚÆäËü´óÐÍÊý¾Ý¿âÀ´Ëµ£¬È·ÊµÓÐЩ²î¾à¡£µ«ÊÇÐÔÄܱíÏÖÉÏ£¬SQLITE²¢²»Ñ·É«¡£ÂéȸËäС£¬ÎåÔà¾ãÈ«£¬ sqlite ʵÏÖÁ˶àÊý sql-92 µÄ±ê×¼£¬±È ......

PythonÉÏ´«Îļþµ½·þÎñÆ÷

#! /usr/bin/env python
# -*- coding: utf-8 -*-
from ftplib import FTP
from os import path
from optparse import OptionParser
from FtpDownload import spilt_cmd
import socket
import sys
'''
ÉÏ´«ÖÕ¶ËMRÎļþµ½·þÎñÆ÷
V1.0    zhai   2009-07-27
'''
def main():
&nbs ......

PythonÏ̱߳à³Ì£¨Ò»£©Ï̶߳ÔÏó

ÎÒÃÇÔÚ×öÈí¼þ¿ª·¢µÄʱºòºÜ¶àÒªÓõ½¶àÏ̼߳¼Êõ¡£ÀýÈçÈç¹û×öÒ»¸öÏÂÔØÈí¼þÏóflashget¾ÍÒªÓõ½¡¢ÏóÔÚÏßÊÓÆµ¹¤¾ßrealplayerÒ²ÒªÓõ½ÒòΪҪͬʱÏÂÔØmedia stream»¹Òª²¥·Å¡£ÆäʵÀý×ÓÊǺܶàµÄ¡£
Ïß³ÌÏà¶Ô½ø³ÌÀ´ËµÊÇ“ÇáÁ¿¼¶”µÄ£¬²Ù×÷ϵͳÓýÏÉÙµÄ×ÊÔ´´´½¨ºÍ¹ÜÀíÏ̡߳£³ÌÐòÖеÄÏß³ÌÔÚÏàͬµÄÄÚ´æ¿Õ¼äÖÐÖ´ÐУ¬²¢¹²ÏíÐí¶àÏà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ