Tuesday, May 20, 2008

internet is here :)

well yes finnaly they connected me to internet, as those two guys from CATV service ask me: "you want color or black/white internet connection?" well its was fun whatching them work.

and yes this means that i wont have to drink as many as coffies as i did last week. because being in internet cafe 6 hours per day is just not something i would liked to do for another week.

Friday, May 16, 2008

virtualenv, zc.buildout or how to develop python apps

i hope i will get some responses of others and how you develop in python, what software do you use, so it bring your devel-deploy story easier.

1. VIRTUALENV
since your are in most cases working on several python apps that rearly have something incommon or they are suppose to work alone, is good the provide this application its own python environment. here you can use virtualenv and create virtual environment for out new app.

>> rok@bestia ~/Projects $ su -
>> Password:
>> root@bestia ~ # easy_install virtualenv
>> Searching for virtualenv
>> ...
>> root@bestia ~ # exit
>> logout
>> rok@bestia ~/Projects $ virtualenv --no-site-packages mynewapp
>> New python executable in mynewapp/bin/python
>> Installing setuptools.............done.
>> rok@bestia ~/Projects $ cd mynewapp/
>> rok@bestia ~/Projects/mynewapp $ source bin/activate
>> (mynewapp)rok@bestia ~/Projects/mynewapp $

and then to exit you virtualenv just do...

(mynewapp)rok@bestia ~/Projects/mynewapp $ deactivate
rok@bestia ~/Projects/mynewapp $

well thats it. you have a clean python environment (no other python packages), only setuptools is installed. and its ready to (ab)use it. its also possible to extend the creation of virtualenv with for example installation of your custom packages. only minus with virtualenv is that is not working under windows. well who is using windows anyway :)

2. ZC.BUILDOUT
its also a python development tool. and lately most popular egg in the cheeseshop, mostly because zope/plone ppl (like me) are using it for developing. it uses recipes which then installs your software, doesnt mather if its python app or some other app. by default you have some recipes that you can use, but its easily to write new ones.

!!! i use both virtualenv and zc.buildout for developing the same python app

>> (mynewapp)rok@bestia ~/Projects/mynewapp $ easy_install zc.buildout
>> (mynewapp)rok@bestia ~/Projects/mynewapp $ buildout init (or bootstrap if you already have configuration file)

then its up to you how/what you insert into your buildout.cfg. follow this link to learn more about the magic that zc.buildout does for you.

Wednesday, May 14, 2008

sarajevo story began

yes summer is here and since i was in my room working for the last 2 months its time to change the room :). and yes i decided to visit my girl in sarajevo. actually i moved to sarajevo, we rent a flat. the only thing i miss is my internet connection, which will be installed in day or two. i'll be here for a month then i try to finish some exams i have left at the faculty in ljubljana. but there is no rush. at least for now i dont see it. currently my main occupation is python/zope/plone and this brings good money that pays bills so i can live with no worries. i know i have to finish school and there is no way i will drop it, i'll just take it a little more slowly, since graduading tomorrow is not going to change anything for me. i'm guessing how many kilos will i gain in 30 days. :)

for those who you are guessing where sarajevo and ljubaljana is.