Posts

Showing posts from 2006

Bangalore Python Conference

(Disclaimer: This is not an official announcement/news) BangPypers [1] is planning a "Bangalore Python Conference" [2] in next February or March. According to Ramdas from DevelopeIQ, there are at least 5000 Pythonistas in Bangalore [3]. This may be true, I know there are two scientific talks going to happen in my near by place, (but I won't be attending it, I am not a scientific guy). Those scientific talks uses Python at "FOSS in Science" (National Workshop on Free Software in Science) on 4-6 January, 2007 [4] (Venue: Union Christian College, Alwaye, Kochi, Kerala) a. Scientific Computing and Data Visualization using Python -Dr. Prabhu Ramachandran, IIT Bombay [5] b. Experimental Physics with Phoenix -Mr. Pramode C.E [6] I think there are many Python programmers all over India. May be we need an "Indian Python Conference" soon. [1] http://tech.groups.yahoo.com/group/BangPypers [2] http://nrcfosshelpline.in/bangpycon/FrontPage [3] http://tech.groups...

Python talk at NSS Palakkad, Kerala

Yesterday, I had a talk on Python at N S S College of Engineering, Palakkad (http://www.nssce.ac.in/) . The talk was arranged by the computer science student's free software community. There were 100+ students. I used the same slides which I prepared for my another talk in last September (http://baijum81.livejournal.com/14649.html) I took almost 1 and 1/2 hours.

My Marriage

My marriage is on next Sunday (12 November 2006). I will be away from net for few days :)

First look at test layers from zope.testing

Recently Zope team has released zope.testing version 3.0 . For more info : http://cheeseshop.python.org/pypi/zope.testing To install : # easy_install zope.testing This is an independent testing framework which can be used outside Zope. One of the interesting feature is test layers. I think next Zope 3 release (3.4) will make use test layers heavily, so I started looking at this feature. The test layer API is here: http://svn.zope.org/zope.testing/trunk/src/zope/testing/testrunner-layers-api.txt?view=auto I will show you a simple example. First a 'hello.py': def hello(): return 'Hello' Then 'tests.py': import hello import unittest class FirstLayer(object): pass class TestHello(unittest.TestCase): layer = FirstLayer def test_hello(self): assert hello.hello() == 'Hello' def test_suite(): return unittest.TestSuite((unittest.makeSuite(TestHello))) The only thing to note here is the 'layer' attribute of 'TestHello'...

New Zope 3 wiki

New Zope 3 wiki : http://zope3.zwiki.org/FrontPage This will be available from wiki.zope.org later.

Pythonic blog is not dynamically typed ?!

I am a frequent visitor of Planet Python, also a subscriber. I also visit http://planet.ubuntu.com/ and http://planet.gnome.org/ regularly. I liked all kinds of posts. The policy of Ubuntu and GNOME planets are given at top of their pages. From planet.gnome.org: "Planet GNOME is a window into the world, work and lives of GNOME hackers and contributors." From planet.ubuntu.com: "Planet Ubuntu is a window into the world, work and lives of Ubuntu developers and contributors." Previously I have written an entry about this: http://baijum81.livejournal.com/11153.html I expect at least a sentence about the policy of Planet Python, so that I can adjust my feeds according to that. I think this will be useful for others too. IMHO, it should be something similar to the above mentioned policies.

Python advocacy and marketing

I was reading Tarek's post on Python marketing: http://tarekziade.wordpress.com/2006/10/15/marketing-python-is-urgent-part-1-a-python-certification/ He suggests a Python certification program. Is this list created for discussion related to Python Advocacy?. http://mail.python.org/pipermail/advocacy/ But I cann't see any posts there (hmm.. I send one in last month, just to test)

Wedding invitation

Yesterday (Sunday) I went to Tomy's home and invited them for my marriage. Before that I spend about 2 hours with Nithya at 'Idavazhi'. Later I went to core for sending invitation to Kotas. I scanned letter and send to them. Today I will send it to Arun,Dideesh etc.

Well, actually this is test

I was thinking about writing a diary recently. In fact I forget many things. I think it has a good aspect, yes forgetting. But there is nothing wrong if we record it somewhere. Sometimes we can go through the old archives and see what you were doing. Why ? nothing.. just to see .. that's all. Now I am sitting in office, soorjith is just opposite to me. Nandu and a new programmer (Sachin) is in the next room. I have to teach him (Sachin) some technologies we use. Well..I am going there now. But before that I have to make a commit.

any and all built-in functions in Python 2.5

Oh! this is very nice: $ python2.5 Python 2.5 (r25:51908, Sep 27 2006, 12:21:46) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> any built-in function any >>> all built-in function all >>> print any.__doc__ any(iterable) -> bool Return True if bool(x) is True for any x in the iterable. >>> print all.__doc__ all(iterable) -> bool Return True if bool(x) is True for all values x in the iterable. >>> any([1,2]) True >>> all([1,2]) True >>> any([1,0]) True >>> all([1,0]) False Hey, I have made few edits here, (blame livejournal's `pre` tag), noticed it ? :)

Happy Birthday to Plone!

Plone celebrate its fifth anniversary: http://plone.org/news/plone-fifth-anniversary I am an outsider to this community, but I have always watched this project. In my opinion, plone is - a great project - a great product - a great community And it has great leadership also. I think community building is much more than creating a big project. May be creating a community with lots of buzz is possible, but making it active always is not easy. And code base is not the only thing required for a successful project. Plone is a great success compared to many other big projects.

Python 2.5, Zope 3.3 releases

This month my favourite programming language and web framework relased newer versions. I reported Python release here: http://digg.com/programming/Python_2_5_final_released Oh! many people dugg it. But I was afraid of Zope 3 release there :) Though, I have written an article here: http://kpug.zwiki.org/WhatIsNewInZope33 Using Personal Wiki ------------------- Recently I realised that using a personal wiki for documentation is better than a public one. (Why ?). Well, the main reason is that you get more freedom and courage. I will be more cautious when adding content to public wiki. And my favourite wiki is ZWiki.

A work in progress chapter from Zope Guide

This is a work in progress chapter from Zope Guide: http://kpug.zwiki.org/ZopeGuide Please contribute! especially grammer mistakes :) Unit testing ************ Introduction ------------ In this chapter, you will learn more about unit testing. Zope 3 use `doctest` based unit testing heavily. Zope 3 preferes test driven development (TDD). To explain the idea, consider a use case. A module is required with a function which returns 'Good morning, name!'. The name will be given as argument. Before writing the real code write the unit test for this. Infact you will be writing the real code and it's test cases almost in parallel. So just create a file named `example1.py` with just the function definition:: def goodmorning(name): "This returns a good morning message" See you are not yet wrote the logic yet. But this is necessary to run tests successfully with failures!. Ok, now create a file named `example1.txt` with test cases, use ReStructuredText format...

Python talk on SFD (2)

Promode has written a good blog entry here: http://pramode-ce.livejournal.com/42465.html . As he said, my intention was to motivate the engineering students to learn Python. I got around 90 minutes. Promode's talk was also included lots of Python, because Python is used in Phoenix (http://nsc.res.in/~elab/phoenix/). It was a really interesting talk, event hough electronics was not my area of interest, I really enjoyed it. I welcome all those who attended this talk to Kerala Python User Group, more details are here: http://kpug.zwiki.org/FrontPage Hmm.. I mentioned Zope 3 too :)

Python talk on SFD

Today I had one Talk on Python at Vidya academy: http://vidyaacademy.ac.in/ I am writing this from their library. Now helping them to install Koha. This is my first Python talk, will write details tomorrow.

Sqlite usage

This is a simple tutorial(?) to use sqlite. I used pysqlite 1.0.1 in Python 2.3, which is the default in Debian 3.1 (Sarge). The latest pysqlite version is 2.3.2, Visit this site for more info: http://initd.org/tracker/pysqlite """sqlite_usage.py: sqlite module usage with examples First import sqlite:: >>> import sqlite Create a temporary directory:: >>> import tempfile >>> tempdir = tempfile.mkdtemp() Now create a db file:: >>> import os >>> dbfile = os.path.join(tempdir, 'testdb.sdb') Now connect to db and create a cursor:: >>> conn = sqlite.connect(dbfile) >>> cr = conn.cursor() Create a table:: >>> cr.execute("CREATE TABLE first_table (a INT)") Insert a value and get:: >>> cr.execute("INSERT INTO first_table (a) values (1)") >>> cr.execute("SELECT a FROM first_table") >>> cr.fetchall() [(1,)] Test comm...

Thiruvonam

Yet another Onam [1] is reached here. Tomorrow is Thiruvonam. Happy Onam to all my journal vistors! [1] http://en.wikipedia.org/wiki/Onam

A nice article by Joe Gregorio

I came across this article today: "Python isn't just Java without the compile" http://bitworking.org/news/Python_isnt_Java_without_the_compile

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

Emacs 22, Sunday, GNOME, Plone ...

Now I am posting this from Emacs 22 for a test (cvs version). And yet another working Sunday :) Just helped to create this page: http://live.gnome.org/GnomeWeb/CmsRequirements/PloneEval There was lots of help (mainly from #plone irc channel) BTW, I found this blog by Jon Stahl, very interesting "Plone and Zope Security" http://blogs.onenw.org/jon/archives/2006/07/22/plone-and-zope-security

CMS for GNOME, Why not Plone?

Are you a Plone and GNOME user, then why not just help GNOME to choose Plone. See GNOME's CMS requirements here: http://live.gnome.org/GnomeWeb/CmsRequirements Also make this page complete (not just complete, but the *best*) http://live.gnome.org/GnomeWeb/CmsRequirements/PloneEval

Two old batchmates

Recently I met two of my batchmates from NITC (http://nitc.ac.in) in different ways. They are 'hackers' and I learned a lot from them. Their blogs and journals are also cool: http://cprogrammers.blogspot.com/ http://www.sood.net.in/journal/

I want to write something...

Hmm... what to write now. Let me try to recollect today's journey. Yeah, as usual, nothing special to remember. I think I woke up at around 5.00 AM, it was heavily raining outside. I didn't got up from bed, I think I slipped to sleep again. Then at 5.40 AM my alarm rung, since it was still raining.. oh! there was some other reason.. well anyway I didn't got up again :) . I used to go for morning walk at this time, these days it was becoming a routine. May be I am afraid of my growing abdomen/belly :) . At 8.05 AM I was in bus, then the same route. Well.. I think I cannot narrate even one day :) . Anyway I will try again :) Hmm.. writing something personal is very difficult task. Sometimes I used to go through some personal blogs, I used to wonder how they write about their life! Yes! it is not an easy task, only very simple minded peoples can do it, so I am not :) . Writing someting technical is not that difficult, only thing is that, we should know the subject....

My first Zope 3 article

Image
http://zissue.berlios.de/z3/Zope3In30Minutes.html I wrote this Zope 3 introductory tutorial in October 2005. It was the most popular zope3 tag in del.icio.us from October 2005 to this month (June 2006). http://del.icio.us/popular/zope3 Also there was a good amount of hits too. http://zissue.berlios.de/z3/z3stat.jpg I am thankful to Philipp von Weitershausen for adding this to http://www.worldcookery.com/Appetizers And Jeffrey Shell for writing about this in http://griddlenoise.blogspot.com/2005/10/some-zope-3-quick-starts-and-resources.html Here is some other Zope 3 tutorials: http://www.treefernwebservices.co.nz/hello.html http://zissue.berlios.de/z3/hello.swf http://www.benjiyork.com/quick_start/ http://worldcookery.com/files/jeffshell-todo http://python.taupro.com/Zope3Notes/HowToContentComponent http://www.ibiblio.org/obp/pyBiblio/zope3

Kerala Python User Group

In 2004, we started "Kerala Python User Group". But it was inactive for a long time. Now I am thinking to re-activate it. Python users are welcome to this group. http://groups.google.co.in/group/python-kerala These are my ideas about this group: 1. Discuss anything related to Python 2. Python advocacy in Kerala 3. Conduct Python Workshops/conferences 4. Help developing Python/Python modules 5. Create a yet another resource site You can read about Kerala here: http://en.wikipedia.org/wiki/Kerala

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__':...

What to write?!

For the last one month I didn't wrote anything here. I have always wondered how some peoples write long matters in journal/blog. Is it just like composing reply to a technical mail. Do they feel the pain of creativity. I usually read python, gnome and ubuntu planets. I like new ideas in programming, technology also I read humor and philosophy. I think most of the planets didn't restrict topics. Some of them writes highly technical stuff only, some writes about life some writes what's happening everywhere else. Well, it is something like this, a type is declared "int me1;", "float me2;". Yes some people sometimes upcast or downcast their values :) And there are few dynamically typed journals/blogs and I like those very much, the first example I can point is Guido's blog (http://www.artima.com/weblogs/index.jsp?blogger=guido). So a "Pythonic blog is always dynamically typed" :) What is your favorite dynamically typed blog/journal?

Characters per line for technical documentations

I was wondering what will be the best choice for the number of characters per line for text based technical documentations. Well, better to reduce the scope of question. Ok, let it be a documentation for Python package/product written using ReStructuredText. My choice is now 80 characters. Any reason to reduce that or not use a character limit at all? Python PEPs are using 72 characters, is there any style recommendation from Python coding or other standards? I started thinking about this from https://launchpad.net/products/bzr/+bug/39657

Fortnightly Zope Newsletter

I think Michael Haubenwallner has silently announced a "Fortnightly Zope Newsletter" This is available from here: http://blog.planetzope.org/ This is really content rich and great looking! Kudos to all those who worked behind this.

Creating a hello world is really easy in Zope 3!

Yes! compared to any other Python/Non-Python frameworks, creating a hello world is really easier in Zope 3. See this: http://www.treefernwebservices.co.nz/hello.html http://zissue.berlios.de/z3/hello.swf So Zope 3 can scale down to anything :)

A test post, my first post to planet!

I am Baiju M from Kerala (http://en.wikipedia.org/wiki/Kerala) A relatiely new Python programmer, hmm.. now two years :) I am working for a small company based in Calicut, before one and half years (when I joined here) our main language was VB. Now for almost all projects we are using Python, now we are Python Powerd! . For our GUI apps we are using PyGTK and for web we decided to use Zope3 (not yet started though). I hope this is enough for now.