Multiple views using bottle.py

I have been using the micro-framework called bottle.py, and starting to write fairly complicated applications on top of it. So I have been able to put together a relatively clean structure based that serves my maintainability issues This setup uses redis, memcached, and mako as the templating language. Lets assume the application name is project. project/project/main.py - This is the core application file that loads up bottle and the pluginsproject/INSTALL - This is the readme and simple installation instructionsproject/middlewares....

September 2, 2012 · 2 min · 232 words · Me

Python, Passenger phusion and dreamhost

Well, had to setup some stuff on dreamhost. Turns out that they are fairly bad on django hosting. Here is a working passenger_wsgi.py that is possibly much better than the default. Please not that you must have paste [http://pythonpaste.org/] installed for this to work correctly. This has python2.7 locally installed in your account, with all the libraries locally. Dreamhost is quite painful, as the documentation is incomplete clearly!

January 22, 2012 · 1 min · 68 words · Me

Listing all your blogposts

So here is a quick snapshot at how to get all your wordpress blogposts using python [or wordpresslib to be specific] – #!/usr/bin/env python import wordpresslib import tinyurl wordpress = raw_input(‘‘Wordpress URL:’’) user = raw_input(‘‘Username:’’) password = raw_input(‘‘Password:’’) prepare client object wp = wordpresslib.WordPressClient(wordpress, user, password) select blog id wp.selectBlog(0) posts = wp.getRecentPosts(100) for p in posts: if p.title.find(“p=”)<0: print p.title," - “,tinyurl.create_one(p.link) – Now that is real easy to use IMHO, i just started using this in one of my scripts....

March 30, 2010 · 1 min · 100 words · Me

Jailed in FreeBSD

Well, working on freeBSD right now some immediate learnings for most linux users Ports is as good as apt-get [and i would say much better, when i started installing stuff] You will need to start with installing vim and bash to make your life a lot easier So the target was to install python and nginx, both of which are very easy to install once you understand how the whole ports collection system works....

March 8, 2010 · 1 min · 174 words · Me

obsessing about bdb, queues

So my nightmares do no cease to end, still debating queue solutions and databases. After spending a lot of time thinking about how to handle 100 million entries , concurrency and a lot of jazz here are some conclusions that I have reached. Tokyo Tyrant needs some testing personally. Can it work well within a constrained VPS ? I doubt that after reading all the test results. So need to do a benchmark for this....

October 9, 2009 · 1 min · 162 words · Me