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

我的VIM配置(ubuntu+python)

1,不用修改/etc/vim下的vimrc及gvimrc文件 。。。
      2,在~目录下,新建一个.vimrc的配置文件。内容如下:(高亮,自动对齐,自动缩进,显示行号)
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Nov 16
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
"Set number
set number
" vim 自动补全 Python 代码
" 来自http://vim.sourceforge.net/scripts/script.php?script_id=850
autocmd FileType python set complete+=k~/.vim/tools/pydiction
"Set a four-space tab indent width in order to prefer codeing style for
"Python
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
endif
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" In many terminal emulators th


相关文档:

配置vim 提高编写python脚本的效率

使用python.vim使python代码高亮
http://www.vim.org/scripts/script.php?script_id=790
使用
Pydiction插件使vim增加tab代码提示功能
http://www.vim.org/scripts/script.php?script_id=850
具体安装方法可以参照帮助或者README,因为版本变化会导致安装方法上产生差异
编辑~/.vimrc文件增加下面选项
set nu 增加行 ......

c语言模拟perl python中的数组负数索引

int main()
{
int a[] = {1,2,3,4,5};
int i;
int * p = a;
for (p = a + 4, i = 0; i < 5; i++) {
printf("%d ",p[-i]);
}

return 0;
}

......

Twisted 网络开发python框架

twisted是一个专门用于python的网络开发的框架。可以说是现在python中新的一支至力于发展高性能网络开发的框架,发展很稳定。
http://twistedmatrix.com/trac/
http://www-128.ibm.com/developerworks/cn/linux/network/l-twist/part1/index.html
http://wiki.woodpecker.org.cn/moin/PyTwisted ......

使用python 3.0 处理utf8格式的文件BOM问题

最近下载了一份最新的python3.0玩儿
没想到print(Hello world)就难为了我半天
问题1,print函数
后来看了一下更新的文档才知道,3.0以后print已经被封装成函数了
而我还一直习惯2.6的 print 'Hello World'形式, 汗一个!
问题2,notepad的utf8格式
我使用notepad写了个测试文件,保存为utf8格式
格式大概是:
test& ......

python 之 pil生成验证码图片

#!/usr/bin/python
#coding=utf-8
import Image,ImageDraw,ImageFont,os,string,random,ImageFilter
def initChars():
"""
允许的字符集合,初始集合为数字、大小写字母
usage: initChars()
param: None
return: list
返回允许的字符集和
for: picChecker类初始字符集合
todo: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号