Posts

Showing posts with the label pygtk

First python 3.0 try !

Image
Congratulations to Guido and all other Python developers ! Today I came to office for some works, but when I looked at planet.python.org I found many posts about Python 3.0 alpha1 release. Then I downloaded Python 3.0 from here: http://www.python.org/download/releases/3.0/ Here is my first "Hello World" program after compilation: And here is the digg story (Digg it!): http://digg.com/programming/Python_3_0a1_Released BTW, it would be really useful if "2to3" is available as egg. Zope 3 has started discussing about Python 3 port , but it looks like no one is interested. One of my favorite toolkit is PyGTK, and see they are really going to port it soon . But it will be only released after Python 3.0 final release.

Why I am biased?!

I was always biased towards many technologies. My favourite programming language is Python, My favourite GUI toolkit is PyGTK. My favourite editor is GNU Emacs. And my favourite web framework is Zope 3. But I think I have to look into django now, because of these posts: http://www.advogato.org/person/titus/diary.html?start=186 http://tabo.aurealsys.com/archives/2006/08/18/guido-van-rossum-and-django-redux/ http://pyre.third-bit.com/blog/archives/613.html http://programming.reddit.com/info/dykr/comments http://www.djangoproject.com/weblog/2006/aug/07/guidointerview/ BTW, Zope 3.3 is coming: http://www.zope.org/Products/Zope3 . Now I am a Zope 3 developer, want to learn the internals for contributing, only few minor commits so far. I managed to create this page: http://kpug.zwiki.org/WhatIsNewInZope33

Functional/Acceptance Testing Using guitest

Introdution guitest (http://gintas.pov.lt/guitest) by Gintautas Miliauskas is a helper library for unit-testing GUI applications written in Python. In this article I will demonstrate how to test a PyGTK application. This article assume you are familiar with ``unittest`` module and unit testing. Installation The latest version 0.3.1 released on 2005-11-26 is available from here: http://gintas.pov.lt/guitest/guitest-0.3.1.tar.gz . Invoke `python setup.py install` to install the library into the local python's site-packages directory. Alternatively you may simply copy the guitest subdirectory to your project's main source directory. Getting Started Consider this example :: import gtk class HelloWorld(object): def __init__(self): self.window = gtk.Window() self.button = gtk.Button("Hello") self.window.add(self.button) self.window.show_all() def main(self): gtk.main() if __name__ == '__main__':...

Singleton pattern for a database connection

I think I understood Singleton pattern, any suggestion? from pyPgSQL import PgSQL class Database(object): _sigletons = {} def __new__(cls): if cls not in cls._sigletons: cls._connection = PgSQL.connect(database='dbname', user='username', password='passwd', host='hostname') cls._sigletons[cls] = object.__new__(cls) pass return cls._sigletons[cls] def __init__(self): self.connection = Database._connection pass def cursor(self): return self.connection.cursor() #other methods follows here #just to test logjam

Culebra, my working copy

I am plannig to put my working copy of Culebra here : http://baijum81.freezope.org/downloads/culebra.tar.bz2

Culebra IDE

http://developer.berlios.de/projects/culebra/ This project originally called grad (started by fernado), then I renamed to grade and hosted at sarovar.org, now it is moved to berlios.de with a new name 'Culebra' which is a spanish word with meaning snake (I don't know which snake). Actually Python has nothing to do with reptiles, but I think many pythonistas like snake names. I am a member of BangPypers (http://www.bangpypers.org), they are planning a project called 'Uraga' which are reptiles with super powers in indian classics. But I don't like reptiles, but the name 'Culebra' sounds very good. Hope it will become a very successful project.

Grade Project CVS

Yesterday, I imported Fernando's source as such to Sarovar CVS. And I made two commits to Grade (http://sarovar.org/projects/grade) Hope I will be able to improve it. I set up two mailing lists, grade-devel@lists.sarovar.org and grade-user@lists.sarovar.org, but not yet made any post. To run grade first check out it from cvs, then install gnome-python-extras Now, $export PYTHONPATH=$HOME/garnome/lib/python2.3/site-packages/:$PYTHONPATH $python grad.py

GRADE Project

I think I will be able to spend some time for GRADE Project. http://sarovar.org/projects/grade