使用cf.SyntaxHighighter作为Windows Live Writer 2011的插件发布Python代码到博客园

安装包cf.SyntaxHighighter.msi v1.2下载地址:

http://www.cnblogs.com/yaoshiyou/archive/2009/11/25/1610901.html

软件界面

image

插入后效果
from random import randint 

def leapYear(year):
    a4 = year % 4
    a100 = year % 100
    a400 = year % 400
    if (a4 == 0 and a100 != 0) or a400 == 0: 
        return True
 
yearList = []
for eachYear in range(20):
    yearList.append(randint(1000, 2051))

print filter(leapYear, yearList)
# From www.cnblogs.com/balian/
原文地址:https://www.cnblogs.com/balian/p/2613910.html