易截截图软件、单文件、免安装、纯绿色、仅160KB

UltraEdit环境python语法高亮设置

我一直在用ultraedit看zope3的源代码.语法高亮设置可参考www.ultraedit.com
UltraEdit是一个很好的工具,但是默认不支持Python的语法高亮,下面是一个现成的WordFile片断,把这段文字Copy到UltraEdit下面的WORDFIL E.TXT文件中,保存后就可以看到UltraEdit对Python文件和语法的支持了^_^(注意,把/L11改为你的Wordfile的片断值)
具体步骤
1 打开菜单Advanced→Configration...,系统弹出一个窗口,
2 单击Syntax Highlighting标签,其中Full Path Name For下面的文件即为语法突出显示配置文件,
3 单击Open,即可在UltraEdit中打开该文件(wordfile.txt),将上文列出的PL/SQL语法配置脚本拷贝到该文件的最后面,
4 同时修改语法配置脚本文件的第一行,如果当前系统语法突出显示配置文件的最后一个为/L9,则将目前加入的Python修改为/L15,保存该文件。
/L11"Python" Line Comment = # Escape Char = \ File Extensions = PY PYW
/Indent Strings = ":"
/Function String 1 = "%[ ,^t]++def[ ]+^([a-zA-Z0-9_]+*^):"
/Function String 2 = "%[ ,^t]++^(class[ ]+[a-zA-Z0-9_]+*^):"
/Delimiters = []{}()<>="'.,:+
/C1"Reserved Words"
and assert
break
class continue
def del
elif else except exec
finally for from
global
if import in is
lambda
map
not
None
or
pass print
raise range return
try
while
/C2"Built-in Functions"
abs apply
callable chr cmp coerce compile complex
delattr dir divmod
eval execfile
filter float
getattr globals group
hasattr hash hex
id input int intern isinstance issubclass
joinfields
len list local long
max min match
oct open ord
pow
raw_input reduce reload repr round
search setattr setdefault slice str splitfields
unichr unicode
tuple type
vars
xrange
zip
__import__
/C3"__Methods__"
__abs__ __add__ __and__
__call__ __cmp__ __coerce__
__del__ __delattr__ __delitem__ __delslice__ __div__ __divmod__
__float__
__getattr__ __getitem__ __getslice__
__hash__ __hex__
__iadd__ __isub__ __imod__ __idiv__ __ipow__ __iand__ __ior__ __ixor__
__ilshift__ __irshift__
__invert__ __int__ __init__
__len__ __long__ __ls


相关文档:

Python正则表达式操作指南[转]

原文出处:http://www.amk.ca/python/howto/regex/
原文作者:A.M. Kuchling (amk@amk.ca)
授权许可:创作共享协议
翻译人员:FireHare
校对人员:Leal
适用版本:Python 1.5 及后续版本
简介
Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式。Python 1.5之前版本则是通过 regex
模块提供 ......

python语法和代码约定

1. 第二章 语法及代码约定                       
                      &nb ......

Python中执行shell命令的实例

1。
myCoolVariable="some_string"
os.system("echo myCoolVariable")
2.
>>> os.system('echo "asdg"')
asdg
0
>>> os.system("echo 'asdgwere'")
asdgwere
0
3.
$ python
>>>hamburger="potato"
>>>import os
>>>os.system("echo 'hamburger'")
potato
0
......

Python简易股票查询(抓取google财经的内容)


看着网上抓取网页数据的文章直瞪眼
后来想到用字符串分割来提取相应部分的内容
程序简单,但数行数和下标费了很长时间
我知道这肯定不是最好的办法- -!!
但我实现了,哈哈
# -*- coding: cp936 -*-
from urllib import *
import re
def stockSearch():
    baseurl="http://www.google.cn/financ ......

Python学习札记

Ubuntu平台下的Python操作Mysql
1.安装Ubuntu,安装Msql.
2.打开终端,输入 python
import MySQLdb
con = MySQLdb.connect(db="python")
cur = con.cursor()
count = cur.execute("select * from test")
print count
data = cur.fetchall()
print data
for d in data:
print d
import os
os.system('clear') ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号