ÇëÎÊpythonÀïÃæµÄ@ʲôÒâ˼£¿
±ÈÈç
Python code:
@orm.validates('title')
def validate_title(self, key, title):
"""Assure that page titles are wikiwords and valid length"""
if len(title) > 40:
raise ValueError('Page title must be 40 characters or fewer')
if not wikiwords.match(title):
log.warning('%s: invalid title (%s)' % (self.__class__.__name__,
title))
raise ValueError('Page title must be a wikiword (CamelCase)')
return title
¸Ðл¡«
Ïà¹ØÎÊ´ð£º
ÏêϸÐÅÏ¢Çë²é¿´:
http://blog.csdn.net/lgg201/archive/2009/10/08/4643635.aspx
Let's-python-ϵÁÐÊÓÆµ·¢²¼×¨Ìù ÊÕ²Ø
ÊÓÆµ½ÏÔçµÄʱºò¾Í˵ÊÇҪ¼ÁË, ÕâÒ»ÖܼÁ˵ÚÒ»¼¯, ÓÉÓÚµÚÒ»´Î¼ÊÓÆµ, ......
ÈçÌ⣡
www.Portablepython.com
ѧϰÁË
¹ÙÍø²»¾ÍÓÐÂð
»òÕß×Ô¼º±àÒëºÃÁË
Portablepython¾ÍÊÇ,Äã´ÓËüµÄ¹ÙÍøÉÏÏÂÔØÏÂÀ´,¿ÉÒÔ°ÑËü°²×°µ½´ÅÅÌÉÏ(ÓÈÆäÊǰ²×°µ½UÅÌÉÏ,¿ÉÒÔËæÉí´ø×Å)
Portablepython ......
Âé·³¸ßÊÖ½â´ðһϠллÁË ÎÒÊÇÐÂÊÖ Ò»Ð©¸ÅÄî¶¼²»Ì«Çå³þ¡£¡£¡£
pyodbc is a Python module that allows you to use ODBC to connect to almost any database from Windows, Linux, OS/X, and more.
pyodbcÊÇ ......
ÕÕ×ÅÊéÉÏдµÄ£¬Ö´ÐÐʱ±¨´í£¨Python2.6£©
import wx
class InsertFrame(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'F ......
ʹÓÃÔ´Îļþ
#!/usr/bin/python
# Filename : helloworld.py
print 'Hello World'
ÎÒÔõôҲ¿´²»¶®£¡Ö»ÊÇ×îºóÒ»ÐÐÎÒÖªµÀ~~Ç°ÃæÁ½ÐÐÊÇʲôÒâË¼ÄØ£¿
½Ì³ÌÉÏ˵Èç¹ûÄãʹÓÃIDLE£¬ÇëʹÓò˵ ......