scite python API
'''gen_python_api.py generates a python.api file for SciTE
The generated api file includes
*) all Python keywords
*) all builtin functions
*) all module attributes
Module functions are represented by their docstring if available,
otherwise by the function definition from the source file.
Classes are represented by their constructor if available.
Usage:
Edit the list of modules which should be excluded. This list is located
some lines below. Look for excludemodulelist = [...]
Specify the modules whose contents should be added as global names
(i.e. from parrot import *). Look for addasgloballist = [...]
Start the script by typing 'python gen_python_api.py' in the shell.
Don't start it from within SciTE on Win32 systems, because some
modules need a TTY when they are imported.
Copy the generated python.api file into your SciTE directory and
add the following lines to your SciTEUser.properties file:
api.*.py=$(SciteDefaultHome)/python.api
api.*.pyw=$(SciteDefaultHome)/python.api
autocomplete.choose.single=1
autocomplete.python.ignorecase=1
autocomplete.python.start.characters=.
autocomplete.python.fillups=(
#autocompleteword.automatic
calltip.python.ignorecase=1
calltip.python.word.characters=._$(chars.alpha)$(chars.numeric)
Restart SciTE. Enjoy.
by Markus Gritsch (gritsch@iue.tuwien.ac.at)
'''
# if one of these substrings is found in a specific sys.path directory,
# the modules in this particular directory are not processed
excludedirlist = ['lib-tk', 'idle', 'Lightflow', 'plat-linux-i386',
'win32', 'pythonwin', 'plat-win',
'test', 'distutils', 'encodings', 'OpenGL', 'gnome', 'pyglade',
'happydoc', 'pygame', 'mx',
'wxPython']
# list of modules which should be excluded
excludemodulelist = ['win32traceutil', 'win32pdh', 'perfmondata', 'tzparse',
'libqtcmodule-2.2', 'libqtc',
'win32com',
'G
相关文档:
Python代码
import string, os, sys
dir = '/var'
print '----------- no sub dir'
files = os.listdir(dir)
for f in files:
......
1.可执行程序
os.system('pgrep %s > %s' % (process, output))
pidfile = open("output", 'r')
totalpid = len(pidfile.readlines())
pidfile.close()
if totalpid == 0 :
&nbs ......
前一段时间试着用这三种语言简单的写了关于文件拷贝的程序,发现c#和python的api惊人的相似,对于文件的操作这两种语言非常的方便。都没有加异常的处理
C#源代码:
public static void CopyFile(string source, string destination)
& ......
原帖:http://www.cnblogs.com/jingleguo/archive/2008/06/02/1211820.html
当python中间处理非ASCII编码时,经常会出现如下错误:
UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128)
0x??是超出128的数字,python在默认的情况下认为语言的编码是ascii编码,所以无法 ......
谢了一个自动下载指定人的博客的脚本
这个脚本是用来下载csdn博客的
同样的方法可以下载一般其他网站的博客,如sina
有时页面访问会被拒绝,重新运行即可
这种程序是在分析了指定网站,我在这儿是csdn,之后编写出的
会牵涉到网页的编码问题,有时程序运行会因此终止
我自己的博客已经下载忘了
只是下载网页
使用网 ......