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 India 2009 Discussion #1

DateTime: 03 Mar 2009 9.00 PM (+5.30 UTC)

Location: #bangpypers at

The first IRC discussion for the PyCon India proposal happened in BangPyper’s IRC Channel. A large number of Pythonistas participated in the discussion and contributed invaluable ideas, suggestions and concerns during the course of the meeting. To our own surprise, the channel recorded it’s highest ever head count even before the officially announced timings. A quick summary of the topics and points raised during the meeting is as follows,


The important topic of discussion was the theme for the PyCon India. People shared their views on what they wanted PyCon India to be.

  • A few people also raised concerns about using the name PyCon, as the name carries a huge value among the international community and any attempts to even make a localized version of it should stand up to the same quality.
  • The target audience for the conference was also discussed. Most people felt that the need for catering to newbies can not be neglected, but at the same time it’s should not just be a beginner level event as well. The conclusion was more on the lines of addressing the interests of already existing python programmers, let them be beginners, novices or seasoned hackers.
  • There was also a stress on giving importance to Indian speakers as this being an Indian version of the PyCon
  • The rationale behind the conference is to encourage Python and to display how PUGs help to spread Python within India (quoting Ramakrishna Reddy).
  • Baiju suggested having each day of the 3 day conference for one type of audience, the first day catering to beginners with tutorials, workshops and beginner talks; the second day filled with developer talks for audience who are already working full time with Python, and the third day being a code sprint.
  • The next main topic getting discussed was whether to have one talk after another or to have parallel talks running at same time.
  • There was also suggestions to have separate tracks for Python for web, system programming and for developing desktop applications.


While it was unanimously decided to have the PyCon India during the first half of September, a majority vote went to 3rd, 4th and 5th of September leaving out the Sunday for people to get back to their real life. This now becomes the tentative dates for PyCon India, to start with looking up for venues on these days. Depending upon further developments happening on other related fronts, the date will get finalized.


Again it was unanimously decided to have it this time in Bangalore. Future PyCon(s) might happen in other cities, but the first one is surely to happen in Bangalore considering the fact that BangPypers is leading the effort, as well as concentration of organizing Pythonistas seem to be maximum in Bangalore comparatively (agreed, this is debatable on other fronts).


The later half of the discussion was taken up by what are the things to be done to move forward. It was decided to have a formal CFP being made soon, as well as having an Open Review process for the submitted proposals using the software used for PyCon. Ghose B has been put responsible for getting the software in place, while Svaksha and Ramdas share the responsibility of Media and Publicity.

Other points which popped out during the discussion are,

  • Whether to have stalls? If so who all can be given a stall?
  • Whether to have delegate fees? If so, what would be the ideal fee?
  • Corporate presence during the conference

As this was the first ever discussion on the idea of having PyCon India, no conclusive decisions were taken other than few stances. Each of the above discussed topic will be subjected to further iterative discussions as things mature and progress further.

The next meet of IRC discussion is currently to happen at #bangpypers in on 10th March 2009, 8.230 PM IST. If you want to participate in the discussions, please be there. We are open to all kinds of ideas, suggestions, concerns and criticisms. Please feel free to poke us at #bangpypers anytime or drop a mail to BangPypers mailing list.

Even if you are not a Pythonista, please help us by spreading the word among your friends, colleagues, your HR and your company. Some of them might be really interested at some aspect of this conference.

(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

the new KDE era begins

All Ks are excited and rather celebrating. Wonder why? Because their new baby is out and it’s rocking the world. Still have no clue of what am excited about too!? It’s all about the new version of KDE , the KDE 4.0 release which happened yesterday. This has been the work of lots and lots of contributors to make a yet-another-endeavor to bless this world with a rocking Desktop Environment. As KDE has always been doing, this time too it has come out with really awesome desktop. The additional good news is that the KDE 4.0 release announcement is also available in various languages like Hindi, Bengali (India), Malayalam, Gujarati, Marathi and Tamil (coming out soon!).

It’s time for the party, one is indeed happening at Mumbai and one is being planned in Chennai as well. Thanks and wishes to all the Ks who have worked to bring out this wonderful version of KDE. Thanks also to those wonderful buddies of mine who translated the release announcement in various languages and to the one who pitched in this whole idea of having localized version of the release announcement 😉

KDE 4.0, its roKKKKKing! 🙂

(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)

[Bash] Quick file renaming

I had a bunch of .deb packages from the apt archive. But the problem was that in the names of the packages, there was a “%3” in the places where there should be a “_”. We found that the symbol was corresponding to the underscore character and it was somehow getting replaced in the name. Hence we needed to rename all filenames, changing the ‘%3’ to ‘_’ and I was requested to write a quick script. As my usual bash buddy was busy, I resolved to some Google’ing and found this.

I first started by trying to echo the file name, then replace the ‘%3’ with ‘_’, print it, and finally rename the file.

for FILE in `ls`; do echo $FILE; done; 
for FILE in `ls`; do NEWFILE=`echo $FILE | sed 's/%3a/_3a/g'`; echo $NEWFILE; done;
for FILE in `ls`; do NEWFILE=`echo $FILE | sed 's/%3a/_3a/g'`; mv "$FILE"  $NEWFILE ; done;

But when I execute my final script, it informs that the oldfile and newfile to the `mv` command are the same. Think the `sed` command itself renamed the file. Anyways, it did the job I wanted it to 🙂

Updates from floyd_n_milan:

for file in *; do mv -v "$i" "${i/\%3a/_3a/}"; done;

(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