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

Python±Ê¼Ç£¨7£©

  Ò»¸öPython½Å±¾µÄ¿ª·¢È«¹ý³Ì
ÎÊÌ⣺Íê³ÉÒ»¸ö¿ÉÒÔΪÎÒÃÇËùÓеÄÖØÒª³ÌÐò×ö±¸·ÝµÄ³ÌÐò¡£
²½Öè²ð½â£º
ÐèÒª±¸·ÝµÄÎļþºÍĿ¼ÓÉÒ»¸öÁбíÖ¸¶¨¡£
Îļþ±¸·Ý³ÉÒ»¸özipÎļþ¡£
zip´æµµµÄÃû³ÆÊǵ±Ç°µÄÈÕÆÚºÍʱ¼ä¡£
ÎÒÃÇʹÓñê×¼µÄzipÃüÁËüͨ³£Ä¬ÈϵØËæLinux/Unix·¢ÐаæÌṩ¡£WindowsÓû§¿ÉÒÔʹÓÃInfo-Zip³ÌÐò¡£×¢ÒâÄã¿ÉÒÔʹÓÃÈκεش浵ÃüÁֻҪËüÓÐÃüÁîÐнçÃæ¾Í¿ÉÒÔÁË£¬ÄÇÑùµÄ»°ÎÒÃÇ¿ÉÒÔ´ÓÎÒÃǵĽű¾Öд«µÝ²ÎÊý¸øËü¡£
±¸·ÝÓ¦¸Ã±£´æÔÚÖ÷±¸·ÝĿ¼ÖС£
#!/usr/bin/python
# Filename: backup_ver1.py
import os
import time
# 1. The files and directories to be backed up are specified in a list.
source = ['/home/swaroop/byte', '/home/swaroop/bin']
# If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
# 2. The backup must be stored in a main backup directory
target_dir = '/mnt/e/backup/' # Remember to change this to what you will be using
# 3. The files are backed up into a zip file.
# 4. The name of the zip archive is the current date and time
target = target_dir + time.strftime('%Y%m%d%H%M%S') + '.zip'
# 5. We use the zip command (in Unix/Linux) to put the files in a zip archive
zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))
# Run the backup
if os.system(zip_command) == 0:
print 'Successful backup to', target
else:
print 'Backup FAILED'

Êä³öΪ£º
$ python backup_ver1.py
Successful backup to /mnt/e/backup/20041208073244.zip


Ïà¹ØÎĵµ£º

Best Replica Gucci Galaxy Python Hobo Bag

ZoundryDocument
Python skin is known for its color variations and for its elasticity; it is
the warmest leather of the season and ideal for the manufacture of many luxury
goods. Sometimes natural patterns can be hidden when they're done in black, but
the finish here has a bit of a shine to it ......

ÓÃÕ»½âÎöËãÊõ±í´ïʽ[Python°æ]

´úÂëÖвÉÓÃÁËÈý²½ÊµÏÖËãÊõ±í´ïʽµÄ½âÎö:
1. ½«ËãÊõ±í´ïʽ(×Ö·û´®)ת»»³ÉÒ»¸öÁбíparseElement·½·¨
2. ½«Áбí±íʾµÄËãÊõ±í´ïʽת»»³Éºó׺±í´ïʽchangeToSuffix
3. ¼ÆËãºó׺±í´ïʽµÄ½á¹û
ÕâÀïÎÒÊÇΪÁË·½±ã, ¾ÍдÁ˸öparseElement, ²»ÏëÄÇ·½·¨Ð´µ½ºóÃæÈ´°Ñ×Ô¼ºÈÆסÁË, ¿ÉÒÔÏëÏóÒ»¸ö´ø×ÔÔö, λ, Âß¼­, ËãÊõµÄ±í´ïʽµÄÊýÖµÌá ......

PythonÖеÄÕýÔò±í´ïʽ»ù´¡

$  ×Ö·û´®µÄĩβ
^  ×Ö·û´®µÄ¿ªÊ¼
\b  ×Ö·ûµÄ±ß½ç
ǰ׺t  ×Ö·û´®Öеķ´Ð±Ïߣ¨ËùÓÐ×Ö·û£©²»×ªÒå
?  ¿ÉÑ¡µØÆ¥Åä(λÓÚ֮ǰµÄ)µ¥¸ö×Ö·û
()  ¸Ä±äÓÅÏȼ¶£¬×÷Ϊһ¸öÕûÌ壬һ¸ö×é
|  »òÕß
(A|B)  ¾«È·Æ¥ÅäA»òBÖеÄÒ»¸ö
{n,m}  Æ¥Å䣨λÓÚ֮ǰµÄ×Ö·û£©nµ½m´Î
VERBOSE  ......

ÓÃCÓïÑÔÀ©Õ¹PythonµÄ¹¦ÄÜ

µ±½ñÓÐÐí¶àÃâ·ÑµÄ RDBMS£¨Relational Database Management
System£¬¹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£©£¬ÆäÖÐһЩÊÇ¿ª·ÅÔ´ÂëÈí¼þ£¬ÁíһЩÊÇÉÌÒµ³§ÉÌÌṩµÄÃâ·Ñ²úÆ·¡£Èç¹ûÄúÕýÔÚʹÓà C/C++¡¢Java™¡¢.NET
»ò PHP
¿ª·¢Ó¦ÓóÌÐò£¬ÏëÑ°ÕÒÒ»ÖÖ¿É¿¿µÄÊý¾Ý·þÎñÆ÷£¬Ï£ÍûËüÖ§³ÖÏȽøµÄ¼¼Êõ¡¢¾ßÓ⻶ÏÀ©´óµÄ¿ª·¢ÈËÔ±ÉçÇø²¢ÒѾ­²¿ÊðÔÚÐí¶à¹Ø¼ ......

pythonµÄwiki ÁÐ×Ó.

#coding=utf-8
from newtest.wiki.models import WiKi
from django.template import loader, Context
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response

def index(request, pagename=""):
"""ÏÔʾÕý³£Ò³Ã棬¶ÔÒ³ÃæµÄÎÄ×Ö×öÌØÊâµÄÁ´½Ó´¦Àí"""
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ