gvim插件python自动补全pydiction的用法

除了复制python_pydiction.vim到指定的插件目录,还需要将
complete-dict和pydiction.py复制到指定目录,注意这两个文件可以复制到任何目录。但是要在.vimrc中指定,比如:
filetype plugin on
let g:pydiction_location=’/usr/share/vim/vim72/ftplugin/pydiction/complete-dict’
let g:pydiction_menu_height=20
参考:
Gvim 的 Python 自动补全插件 Pydiction 安装
Windows和Linux差别不大。

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

Editra

Editra is a multi-platform text editor with an implementation that focuses on creating an easy to use interface and features that aid in code development. Currently it supports syntax highlighting and variety of other useful features for over 60 programming languages.
Editra is freely available for personal use under the terms of the wxWindows License.
Currently the [...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

Google App Engine webapp使用中文

参照:Google App Engine webapp framework

# -*- coding: utf-8 -*-
# 使用UTF-8编码,如果不加会因为中文编码导致python执行问题
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('此处可以输出中文正文!')

application = webapp.WSGIApplication(
[...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

几个Python框架

1. Pylons
Pylons is a lightweight web framework emphasizing flexibility and rapid development.
Why use Pylons?
Pylons combines the very best ideas from the worlds of Ruby, Python and Perl, providing a structured but extremely flexible Python web framework. It’s also one of the first projects to leverage the emerging WSGI standard, which allows extensive re-use and flexibility [...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

IIS and Django

中文版:在Windows平台下的IIS中发布Django应用
英文版:Django On Windows With IIS And SQLServer

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

Zenoss Core

Zenoss Core是开源企业级IT管理软件-是智能监控软件,他允许IT管理员依靠单一的WEB控制台来监控网络架构的状态和健康度。Zenoss Core同时也是开源的网络与系统管理软件。

Zenoss Core的强大能力来自于深入的列表与配置管理数据库,以发现和管理公司IT环境的各类资产(包括服务器、网络、和其他结构设备)。Zenoss可以创建 关键资产清单和对应的组件级别(接口、服务、进程,已安装的软件等)。建立好模型后,就可以监控与报告IT架构中各种资源的状态和性能容限了。 Zenoss同时提供与CMDB关联的事件和错误管理系统,以协助提高各类事件和提醒的管理效率。以此提高IT管理人员的效率。
来源:开源中国
Zenoss Enterprise Features

> A Single Product for Full Operational Awareness
* One Source for Real-Time Visibility into Your Entire IT Infrastructure
* One Application to Discover, Model, Monitor, Manage Events, Alert, Remediate and Report
* One Product for you to Administer and Maintain
> Scale to Manage Tens of Thousands of Resources
* Horizontally [...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

python关于web service的一点资料

还是资料,这次是关于python的。
1. JCC installation instructions
2. setuptools
3. Installing PyLucene
4. Python开发WebService: REST, web.py, eurasia, Django
5. Getting RESTful with web.py
6. 强大的sqlalchemy
7. 用python实现CRUD功能REST服务
8. sqlalchemy作者作品之一Myghty
9. Mason – a powerful perl-based web site development and delivery engineJonathan Swartz
10. SQLAlchemy老巢
11. 使用 python 开发 Web Service
12. limodou的python学习decorator的使用,修饰函数也许以后会很常用。说穿了,有没有点象函数泛型?
13. Google Data APIs
14. Juiced Google Analytics Python API
15. Python Module Auto Reload
16. 使用 SQLAlchemy这个还是质量比较高的一篇
17. 在linux 下运行PowerDesigner 15 [...]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

动态引入python类

Borland一系的开发工具,RTTI功能都比较强,这使得我们很容易Create a object from classname。不过borland框架的限制是所有的对象需要从TObject继承。当然,当遇到不同的构造函数(constructor)的时候,创建对象可能会出现意外。造成内存泄露,对象狂野,流程不可预期~~~。
这个微妙的时刻,接口可以帮助我们实现模式里的AOP切分。其实什么面向方面、面向对象、各种模式在某些时刻会产生矛盾,强烈要求一致、业务分割、松耦合,关键是业务的时限,要求你三两天拿出模块来,死扣书本的人会输到一塌糊涂。
话说RTTI的这个由字符串到类实体创建可以帮助我们渡过耦合这个难关。想好了各种接口,就让配置文件起作用吧,module们,动作起来吧。
python里从字符串到类实体通过资料实现思路如下:
1. 创建模块文件,如importx.py:

#
class X:
def test(self):
print "test from x"

2. 调用模块文件

m = __import__("importx")
obj = m.X()
obj.test()

如果制定好X遵循某接口,你的系统也许就是只需要“配置”一下。
参考资料:
1. Importing Python Modules
2. How to dynamically load a Python class

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

python一句话,求10000以内的素数

最近加入了一个QQ群,学到如下,原文是求100以内的素数,因为难以用肉脑比较时间,所以改成10000。

#Fictiony 陈:
[x for x in range(2,10000) if not [i for i in range(2,x) if x % i == 0 ] ]

#Fictiony 陈:
reduce( lambda s, x: s+ ([x] if all([x %i for i in s]) else []), range(2,10000), [])

#七月:
[2]+[d for d in range(3, 10000, 2) if 2 ** (d -1) %d == 1]

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks

PIDA-a editor for python

sudo apt-get install python-gtk2 bzr mercurial python-dbus vim-gnome emacs-snapshot medit python-dev python-gtk2-dev
hg clone https://bitbucket.org/aafshar/pida-main/ pida
cd pida
./tools/update_externals.sh
python setup.py build_ext –inplace
./run-pida.py
问题:
1. 在terminal中运行,提示medit for python binds未安装
2. 创建一个Launcer,如果是应用模式,提示medit和vim for python未安装

Share and Enjoy:

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • Live
  • MisterWong
  • Slashdot
  • TwitThis
  • Upnews
  • Yahoo! Bookmarks
Page 1 of 3123