Skip to main content

Posts

Buildout custom Python interpreter

Menggunakan Buildout , kita boleh generate custom Python interpreter khusus untuk kegunaan projek buildout ini dengan sys.path disetkan kepada eggs dalam projek ini. Berikut contoh buildout.cfg yang digunakan:- [buildout] newest = false parts = pylons python find-links = http://pylonshq.com/download/0.9.7 develop = . [python] recipe = zc.recipe.egg interpreter = python [pylons] recipe = zc.recipe.egg eggs = nose>=0.11.1 Paste>=1.7.2 PasteScript>=1.7.3 PasteDeploy>=1.3.3 Pylons==0.9.7 SQLAlchemy==0.5.5 Jinja2==2.1.1 Tapi apabila run, dapat error:- We have no distributions for python that satisfies 'python'. Getting distribution for 'python'. We have a develop egg: setuptools 0.6c9 Running easy_install: /usr/bin/python "-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" "/home/kamal/webapps/clinic-pylons/eggs/tmpflXKv-" "-q" "/usr/lib/python2.5/lib-dynload...

easy_install read pip requirements.txt file

No way to feed PIP requirements file into easy_install , so the following snippet do the job:- import os f = open("requirements.txt") reqs = f.read().split("\n") for req in reqs: # ignore comments or pip options if req.startswith('--') or req.startswith('#'): continue # ignore blank lines if len(req) > 0: os.system("easy_install %s" % req)

Bookmark

Found few interesting stuff:- Pressflow, kind of Drupal distro aim for faster performance - http://pressflow.org/ Drupal module for OpenLayers - http://drupal.org/project/openlayers Flunc, web functional test - http://www.coactivate.org/projects/flunc/project-home Kind of heard about Twill before never look into it. Look quite interesting. Flunc act as a wrapper to twill script.

Meta blog

With www.k4ml.com being abandoned and not updated anymore, I've decided to start blogging here. The old site probably would being resurrected as a business site some other time. For now, all stuff would end up here.