Tag Archives: python

Classic Testing vs Design By Contract

Automated unit tests are hard to write. Software architecture must be designed carefully to allow unit testing. You have to spend time to write tests as well and it's not easy to write good tests. It's easy to make big … Continue reading

Posted in en | Tagged , , | Leave a comment

Migration to python subprocess module

After recent OS upgrade one of my unit tests started to fail (to be precise it started to hang). Quickly check showed me that CGI process started by os.popen() hanged. The old source code: f = os.popen("./cgi_script.cgi > /dev/null", "w") … Continue reading

Posted in en | Tagged | Leave a comment

Static verificaiton tool for web2py templates

Web2Py is a full-stack Python web framework that can be compared to Django, but is easier to learn due to convention-over-explicit-statement preference. In this article I'll check how static verification techniques developed by me for many different environments (JSP, Django … Continue reading

Posted in en | Tagged , , , , | Leave a comment

Python Web Framework Selection

I've been using many different Python Web Frameworks so far: WebStack + mysqldb + custom template framework (long-term ERP project for small company) Django (online shop) CherryPy + Cheetah (online PDF design) Zope (financial) WebStack + SimpleTAL (online PDF design) … Continue reading

Posted in en | Tagged , , , | Leave a comment

How To Migrate Django To Different Database Backend

Changing database location is simple – just launch dump on source database server, import it into destination database, redirect domain and voila! You can use this method to migrate your database into newer database engine version. But what can you … Continue reading

Posted in en | Tagged , , | 1 Comment