inpycon09 the success story

When the first discussions happened, everybody doubted it might become just another conference discussion that will never happen. It has taken the support and sheer determination of quite a number of people to make it happen. We just wanted to try it once, to at least see how the Python community responds to such initiatives and it has ended up being more than encouraging to make this a yearly event. This is the simple story of inpycon09.

When I landed at the IISc campus on a not so chilly morning, the posters were up and I could find a few people waiting here and there in the corridors. When I entered nothing was up yet, other than a few volunteers running around putting posters and direction notices. Slowly people started turning up and I could see more known faces. By 9 AM, there were enough crowd to start the registration counter and soon a long queue got formed.

The conference kit consisted of a notepad, ID tag, a pen and a pycon tee. It was a simple white tee, with a caption in the back. Unfortunately we ended up having a spello in it, which indeed made the tee more special 😉 Halls were fast filling up and when Prabhu Ramachandran was delivering the keynote the benches got filled and people started filling up the foot steps as well. It was a very interesting talk, encouraging everyone to go and give a shot with Python. He had also included his associations with ILUGC and how it helped him. He advised people to become a part of an active LUG. His talk was mostly around SciPy and Mayavi.

As the keynote ended, talks in other two halls started, kicking the normal proceedings of the first day of inpycon. Every hall was running full house and we would’ve had around 300 people attending the conference, especially a big bunch of students of REC, Chennai. Kenneth and Noufal took the Introduction to Python talk, leaving me for the second day. There was actually a balance of talks, not just focusing on web development. And the lunch was really good.

A lot of #linux-india guys had turned up and it was surprising to meet them before the normal season. The first day ended up quite satisfactorily and gave us hopes for the second day to run smoothly. Though we did not have a huge crowd on the second day, and it being only a half day of scheduled talks, it too went calmly. I took the beginners’ introduction to Python, following by Kenneth taking some advanced topics. There was a white sheet posted with post-it notes to be used to express the feedbacks from delegates and we ended up getting some quite interesting, even contradicting opinions posted about the conference. We welcome the criticisms as it helps us to know our holes and stop it from appearing next time.

On the whole, the beta release of inpycon was a satisfying success, leaving my weekend to have not been wasted and giving us the encouragement to come back better next year, may be in Chennai 😉


PyCon in India

PyCon is the annual conglomerate of Python community at various places around the globe. It is an occasion which brings together the developers, users and business community around Python, serving as a platform to interact and share each others’ views and experiences.

There was always an idea to have once such conference in India, but the need for it has become stronger of late in the BangPypers mailing list that has given to numerous threads of discussions going on in the mailing list. Also a formal proposal is getting drafted as well as open discussions happening in the wiki were people can pen down their opinions and ideas.

The month of September has been proposed for the tentative time for PyCon India to happen, but it is still under discussion. The few hot topics among the on-going discussions are whether to have tee-shirts available or should we have more useful stuffs like Python cheat-sheet given as a part of delegate kit. Also, what’s the level and mode the conference should take up being the first such event in India is also a point to decide upon.

Baiju also raised the idea of inviting Guido to open up the conference, as they would be having an opportunity to meet him during the PyCon in Chicago to happen soon.

Another point to remember is that PSF doesn’t want numerous PUGs in the country to have their own PyCons, which means all PUGs within India should put their heads together and organize a PyCon in the country together. This means we can have the PyCon each year at a new location, and the decision can be made during the current year’s PyCon about the next year’s venue. As the initial discussion has started in BangPypers, the beginning will most probably happen in Bangalore.

I know only three active PUGs in India, the BangPypers, the ChennaiPy and MumPy (which is pretty infant comparing the other two). If you know of any more PUGs, please enlighten me up so I can keep them on the loop as well.

Please feel free to add your thoughts in the wiki. We will soon select an organizing committee, and despite it we will need lots of volunteers and lots of sponsors. If you are in a company using Python and would like to participate and/or sponsor in this wonderful event, then please join the BangPypers mailing list or poke us in #bangpypers in We will soon try to have a dedicated mailing list running up for all discussion relating to the PyCon.

If you have any more points to add to this post, please drop a comment to this post and I will consider adding  it 🙂 Let’s all make the PyCon happen in India. Python, FTW!! 🙂

(Python) PyProgram #8 – Cycling Alphabets

Kushal came down with a simple looking problem with constraints that might make solving it a bit not-a-needle-into-the-banana. As usual, me and Jacob sat down trying to solve it. Rather try finding various ways of solving it. The problem is, given one character within the range a-z or A-Z (not as a list, but from string.letters) we have to find the next character in the alphabetical order. When ‘z’ or ‘Z’ is encountered, the next alphabet returned should be ‘a’ or ‘A’ respectively. The constraint is that if or while conditions and for loops should not be used. And more importantly, the main solution should be of a single line. Though Kushal had a more mathematical solution, this is what me and Jacob managed to cook up as a more logical solution (note the ‘and’ and ‘or’ 😉 ),

import string

def thenext(theletter):
    return ((string.letters.find(theletter)+1) %26) and (string.letters[string.letters.find(theletter)\
+1]) or (string.letters[string.letters.find(theletter)-25])

print "for 'a' i get: "+thenext('a')
print "for 'g' i get: "+thenext('g')
print "for 'z' i get: "+thenext('z')
print "for 'A' i get: "+thenext('A')
print "for 'H' i get: "+thenext('H')
print "for 'Z' i get: "+thenext('Z')

The solution looks like..

for 'a' i get: b
for 'g' i get: h
for 'z' i get: a
for 'A' i get: B
for 'H' i get: I
for 'Z' i get: A

Its hard to get one

When we were attending, we got a good news from our higher ranks at the place where we work (we = jace, kushal, me) that we can go forward and recruit some more programmers. We are also in need of a Release Manager (hopefully we are soon getting some one for this) and a Sys Admin exclusively for our team (we have one, but he is heavily loaded from all corners).

As we are basically a Python shop and work extensively on FOSS, we need some one with an exposure to both of them. It would be great if we get one with experience in Zope/Plone, but our minimal requirement is “should be able to work with python from day 0”.  We are still hunting for a Python Programmer, whom we need as soon as possible. We aren’t finding one easily, rather am getting invites from other Python shops to join them 😛

If you are a programmer, who knows Python, have some exposure with Web Development, and looking for an interesting and challenging job in a nerdy environment surrounded by well known faces from the Indian FOSS community, then please poke (PM) us (jace, kushal and teKnofreak). We are always available at #linux-india @, else leave us a memo 🙂

(Python) PyProgram #7 – Time Object Diffs

I had two time objects and needed to find the difference of time between them. Upon Googling, querying in #python and checking the documentation, found that there is not built-in function available for this. Though there were some cookbook recipes, I wanted to write my own solution to find the difference between two datetime.time objects. Though datetime.timedelta was for time difference requirements it only has a days, seconds and microseconds property while I need hour, minute and seconds. Thus, I wrote my timediff method which accepts two time objects btime and stime where btime is a bigger time than stime (b for big and s for small 😉 ), and it returns a datetime.time object for the difference time. (Why I need to have time objects? I use storm ORM 😉 )

def timediff(btime, stime):

    """Difference between two datetime.time objects

    Accepts two datetime.time objects where btime > stime

    Returns a datetime.time object of the difference in time of

    the two datetime objects.


    btdelta = timedelta(hours=btime.hour, minutes=btime.minute, seconds=btime.second)

    stdelta = timedelta(hours=stime.hour, minutes=stime.minute, seconds=stime.second)

    tdiff = btdelta - stdelta

    tdiffsec = tdiff.seconds

    if tdiffsec < 60 and tdiffsec > 0:

        return time(0, 0, int(tdiffsec))

    elif tdiffsec < 3600 and tdiffsec > 0:

        tdiffsplit = str(tdiffsec/60.0).split('.')

        tdiffmin = int(tdiffsplit[0])

        tdiffsec = float("0."+tdiffsplit[1])*60

        return time(0, int(tdiffmin), int(tdiffsec))

    elif tdiffsec > 0:

        tdiffhourmin = str(tdiffsec/3600.0).split('.')

        tdiffhour = int(tdiffhourmin[0])

        tdiffminsec = str(float("0."+tdiffhourmin[1])*60).split('.')

        tdiffmin = int(tdiffminsec[0])

        tdiffsec = float("0."+tdiffminsec[1])*60

        return time(tdiffhour, tdiffmin, int(tdiffsec))


        return time(0, 0, 0)

looking for an editor that works

Been using emacs for long, though occasionally used vi as well while left alone in the terminal. Then learnt the `emacs -nw` trick for terminal emacs, created an alias (`e`) and kept moving. But sometimes I felt the need of a better editor when things did not work the way I wanted it to. Though emacs can be customized as much a Hardy Davidson can be, but not for a lazy ass like me.

Was working with webpy since morning and I had been struggling at one point since 4 p.m. It had been a single statement of using the insert function which had been messing in a mysterious manner. After trying, trying and still trying, I found out it had something to do with how it is in the file. It’s just my conclusion, but am afraid its the real reason too. Then I tried gvim, enabled syntax highlighting but it still doesn’t auto indent which I very much need while writing Python code. Thus started wondering if there is any other near to ideal editor in this world. The mac comes with one, which I have seen jace working with. But I neither have a mac book nor have it on Ubuntu.

The search for a better editor that works for me continues….

(Python) PyProgram #6 – Finding weeks of a month

My colleague had a problem, he needed to separate the dates in a month according to weeks. That is, given a month, he has to find the dates in 1st week, dates in 2nd week and so on. This is need to query and collect a weeks data for a given month. He was trying to write his own solution which we Python guys around thought was a bit non-straight forward. My other colleague Jacob sat and wrote a small Py script to order the dates per week of a given month,

from datetime import datetime, timedelta

current_date = year, month = current_date.timetuple()[:2]

first_day_of_month = datetime(year, month, 1)

if month == 12:

    first_day_of_next_month = datetime(year+1, 1, 1)


    first_day_of_next_month = datetime(year, month+1, 1)

#Subtracting 1 day

last_day_of_month = first_day_of_next_month - timedelta(1)

#First and Last days of the month

print first_day_of_month, last_day_of_month

#Computing start and end week days

first_week_day = first_day_of_month.weekday()+1

date_range = [0]*first_week_day + range(,

month = []

while date_range:

    if len(date_range) >= 7:

        week = date_range[:7]

        date_range = date_range[7:]


        week = date_range

        date_range = None


for week in month:

    print week

for week in month:

    start_week, end_week = min(week), max(week)

    if start_week==0:

        start_week = 1

    print start_week, end_week