UltraEdit对Python的高亮显示
工具栏->高级->配置->编辑器显示->语法加亮->打开
在打开的文件中结尾加上下面文字,并保存。
/L10"Python" Line Comment = # Block Comment One = """ Block Comment Off = """ Escape Char = \ File Extensions = PY PYW
/Indent Strings = ":"
/Function String 1 = "%[ ,^t]++def[ ]+^([a-zA-Z0-9_]+*^):"
/Function String 2 = "%[ ,^t]++^(##[ a-zA-Z0-9_]+*^)##"
/Function String 3 = "%[ ,^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
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__ __lshift__
__mod__ __mul__
__neg__ __nonzero__
__oct__ __or__
__pos__ __pow__
__radd__ __rdiv__ __rdivmod__ __rmod__ __rpow__ __rlshift__ __rrshift__
__rshift__ __rsub__ __rmul__ __repr__
__rand__ __rxor__ __ror__
__setattr__ __setitem__ __setslice__ __str__ __sub__
__xor__
/C4"__Attributes__"
__bases__
__class__
__dict__ __doc__
__methods__ __members__
__name__
__version__
/C5"Exceptions"
ArithmeticError AssertionError AttributeError
EOFError Exception
FloatingPointError
IOError ImportError IndentationError IndexError
KeyError KeyboardInterr
相关文档:
python应用领域介绍
Python作为一种功能强大且通用的编程语言而广受好评,它具有非常清晰的语法特点,适用于多种操作系统,目前在国际上非常流行,正在得到越来越多的应用。
下面就让我们一起来看看它的强大功能:
Python(派森),它是一个简单的、解释型的、交互式的、可移植的、面向对象的超高级语 ......
writeblog.csdn.net writeblog.csdn.net/PostEdit.aspx
这个程序很早以前就写过了,而且是参考的别人的写,具体谁的发在哪里我都忘记了。这里就算是半原创了,如有侵权请及时通知改正。
因为从今天1月1号开始,Google上订阅的天气预报服务已经取消了,估计是Google被施加压力了。反正是收不到天气预报了。正好重拾以前 ......
能整理大部分无用文件
#!/usr/bin/python
#syscleaner.py
import os
import os.path
#delete files and directory recursively
def itedel(dir):
print('in dir :'+dir)
for doc in os.listdir(dir):
try:
if(os.path.isdir(doc)):
itedel(dir+'\\'+doc)
......
[root@pku-fan MySQL]# cat limbs.sql
CREATE DATABASE cookbook;
USE cookbook;
DROP TABLE IF EXISTS limbs;
CREATE TABLE limbs
(
thing VARCHAR(20), # what the thing is
legs INT, ......