New weblog

This the last post in this URL.
I’ve moved this weblog to http://mariz.org, please update your bookmark.

Mac OS X: decoder jpeg not available

If you are using PIL(Python Imaging Library) on Mac OS X(Tiger), you will probably have a “decoder jpeg not available” when resizing a jpeg image.
This probably means that PIL doesn’t have JPEG support, because libjpeg wasn’t found when PIL was being configured.
Here is the solution:

  • Download, compile and install jpeglib and zlib
  • Edit PIL setup.py and change to:

    JPEG_ROOT = "/usr/local/include"
    ZLIB_ROOT = "/usr/local/include"
    
  • Compile:

    python setup.py build_ext -i
    
  • Test:

    python selftest.py
    
  • If the result is something like this:

    "57 tests passed."
    
  • You are ready to go:

    python setup.py install
    

New year…

New year…
New job
New programming language
New laptop
New life!

Back from Honeymoon

I’m back from our honeymoon, this is the first post as married status.
Our honeymoon was full of adventure, we had a forced stop in Doha(Qatar) for about 12 hours, caused by another delay at London Heathrow airport, due to our airplane being struck by lighting.
Although this seems a nightmare, it turned out to be quite fun as we met a lot of interesting people. Among them was a nice couple of portuguese(Valter and Catarina from Naza - private joke;)), that continued the journey with us to Meeru Island. We miss you guys!
Resume: Simply delicious, paradise on earth, fantastic!
You can view some photos here.

Python 2.5 is out!

Python

Python 2.5 is the latest major release of Python.
As Guido it promised, wsgiref was added to the Python 2.5 Standard Library. For those who don’t know what wsgi is, read this.
You can find what’s new in Python 2.5 here

Pro Django: Web Development Done Right

Pro Django: Web Development Done Right

The first book about Django was released is available for pre-order at amazon.
The authors are Adrian Holovaty and Jacob Kaplan-Moss, both involved in the project.
This book will definitively be my next buy.

The first part of the book introduces Django fundamentals like installation and configuration. You’ll learn about creating the components that power a Django-driven web site. The second part delves into the more sophisticated features of Django, like outputting non-HTML content (such as RSS feeds and PDFs), plus caching and user management. The third part serves as a detailed reference to Django’s many configuration options and commands. The book even includes seven appendixes for looking up configurations options and commands. In all, this book provides the ultimate tutorial and reference to the popular Django framework.

Terminal colors on Mac

Trivial but useful.
If you are using bash, just edit your .profile (explanation):

# colors
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=gxgxcxdxbxegedabagacad  # cyan directories
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '

Django is the favourite of Guido van Rossum

Django Project

Guido van Rossum said in the latest FLOSS Weekly podcast:

My personal favorite — and I expect that that will remain a personal favorite for a long time — is something named Django. … I highly recommend it.

Django has been my tool for a new project of mine, has been worth it the time spent learning Django and Python(right now my personal favourite programming language).
Django preferred setup is Apache with mod_python, this has make my choice easier because I’ve been always using Apache with PHP.
If you want to give it a try(I recommend it), read the Part 1 of the tutorial.
And if you have doubts about performance, read this.

Maldivas here we go…

More info/pictures.

Maldivas

Massive Attack

Love you, love you, love you…

Massive Attack Ticket

Next Page »