“libgfapi-python” is now available as Fedora rpm. ( python-glusterfs-api)

I wanted to see this as distro package for long time, but it happened very recently. Eventhough there had a package review request, I couldnt follow up and get it completed. There was few other thoughts on this which also caused the delay. Any way, with the help of kaleb Keithely and Prasanth Pai it is now available in Fedora !.

There were many users wanted this rpm/package in distributions like fedora to make use of libgfapi python bindings and to become consumers of this api client.

Please give a try and let us know your feedback!

@pycon 2013 bangalore..

Pycon 2013 India conference was held on Aug 30,31 & Sep 1st in Bangalore . This is the 5th year of PyCON India, conference was attended by more than 1100 or I would say Bangalore was filled with python enthusiasts 🙂 . The keynotes, sessions, workshops and panel discussion (on Python in education) were good . Glad to be part of it.

Personally I met lots of my friends in this event – for me, it was ‘two for one’ .

Without much introduction, let me show you the sessions :

Panel Discussion : :

What do you think about embedding python programming in education? how to do that ? possibilities ? Struggles ? when to apply it and how ..etc..etc..

Nothing much to write here, just listen to them..

The Paradox of Code: Asset vs. Liability (Keynote from Kiran Jonnalagadda):

Kiran discussed about Functionality Vs Coding, Maintenance cost of your project, how a good programmer should be. The path to that, open sourcing your project..etc..

Python for humans :

keynote from Kenneth Reitz on some of the best practices of ‘open source’ project handling, otherway ‘Do’s or ‘Donts’ of it. I believe, it will help everyone on gathering tips about how to make your community happy and a fruitful project at end, you just need to follow these notes…

Python in RaspberyPi :

One of the best sessions of pycon 2013. Programming Raspberry Pi with python . I never thought, its that simple as that. After this session, I really got an interest to get a Raspberry Pi in my collection. In this session, ‘Sudar’ showed programming GPIO of Raspberry with python. Please watch it guys, its worth 🙂

Building fast python with zeroMq: One of the sessions which caught my attention 🙂 . ‘zeromq’ looks really cool to implement a messaging queue. I put it on ‘todo’ as soon the session was over.

The list goes … but ‘goodies’ remain with me.. 🙂

Building skynet:

Chugging Flask

virt-manager hangs on ‘searching for available hypervisors’ window and not able to cancel it ?

Ah… I would say it ruined my day 🙂

I updated my fedora system from fedora 18 to 19 as mentioned in my previous post ( website-humblec.rhcloud.com/smooth-upgrade-from-fedora-18-to-fedora-19/ ) and was trying to play with VMs via virt-manager.

How-ever virt-manager showed a window with title ‘Searching for available hypervisors’ and keep showing it indefinitely. I waited for some time and realized its stuck and not going to give me a result.

I knew something is going wrong and decided to fetch it..

How would you troubleshoot ? any way, I had virt-manager upstream repo cloned in my system and realized things are easy when you look at the code.

It was not that tough to find out, its going wrong with the ‘packageKit’ lookup. Knowing only ‘yum’ process can talk to only one, I came to know its the root cause.

To prove it , I tried ‘ps’ command and noticed there is a ‘yum’ process already running .

Ahhhhhhhhh.. Then obviously my next step was to ‘kill this process’..

That did the trick! Once the above process is killed , virt-manager progressed from the ‘problematic’ window.

I had also noticed, when I tried to click on ‘cancel’ button, virt-manager didnt respect it. No effect at all.

So, obviously there is a bug and a possibility of a better user notification.

So, I decided to file a bug and propose patches for both.

Just before filing bug, I did a random search on this behaviour , my luck , I noticed a similar bug report from F-16 time and a recent update on the bugzilla saying some one faced the issue in F-19 as well.

You can read the same report at:


Comment 5,6,7 in the above bugzilla made my evening .. :)..

Now, let me wait for Cole to revert on this. At-least for now, you have a work around of killing ‘running yum process’ to progress further..


Cole is back with valid points and you can track it in bugzilla.redhat.com/show_bug.cgi?id=746011#c9 & c#10

what are the builtin attributes of python interpreter

When I started to code in python , I was thinking how can I get a list of builtin attributes ( ex: len) of python interpreter . Looking into documentation does not seems to me a good method . I would like to have it from python interpreter.

I got the result in following way.

>>> import __builtin__
>>> dir(__builtin__)
[‘ArithmeticError’, ‘AssertionError’, ‘AttributeError’, ‘DeprecationWarning’, ‘EOFError’, ‘Ellipsis’, ‘EnvironmentError’, ‘Exception’, ‘False’, ‘FloatingPointError’, ‘FutureWarning’, ‘IOError’, ‘ImportError’, ‘IndentationError’, ‘IndexError’, ‘KeyError’, ‘KeyboardInterrupt’, ‘LookupError’, ‘MemoryError’, ‘NameError’, ‘None’, ‘NotImplemented’, ‘NotImplementedError’, ‘OSError’, ‘OverflowError’, ‘OverflowWarning’, ‘PendingDeprecationWarning’, ‘ReferenceError’, ‘RuntimeError’, ‘RuntimeWarning’, ‘StandardError’, ‘StopIteration’, ‘SyntaxError’, ‘SyntaxWarning’, ‘SystemError’, ‘SystemExit’, ‘TabError’, ‘True’, ‘TypeError’, ‘UnboundLocalError’, ‘UnicodeDecodeError’, ‘UnicodeEncodeError’, ‘UnicodeError’, ‘UnicodeTranslateError’, ‘UserWarning’, ‘ValueError’, ‘Warning’, ‘ZeroDivisionError’, ‘__debug__’, ‘__doc__’, ‘__import__’, ‘__name__’, ‘abs’, ‘apply’, ‘basestring’, ‘bool’, ‘buffer’, ‘callable’, ‘chr’, ‘classmethod’, ‘cmp’, ‘coerce’, ‘compile’, ‘complex’, ‘copyright’, ‘credits’, ‘delattr’, ‘dict’, ‘dir’, ‘divmod’, ‘enumerate’, ‘eval’, ‘execfile’, ‘exit’, ‘file’, ‘filter’, ‘float’, ‘frozenset’, ‘getattr’, ‘globals’, ‘hasattr’, ‘hash’, ‘help’, ‘hex’, ‘id’, ‘input’, ‘int’, ‘intern’, ‘isinstance’, ‘issubclass’, ‘iter’, ‘len’, ‘license’, ‘list’, ‘locals’, ‘long’, ‘map’, ‘max’, ‘min’, ‘object’, ‘oct’, ‘open’, ‘ord’, ‘pow’, ‘property’, ‘quit’, ‘range’, ‘raw_input’, ‘reduce’, ‘reload’, ‘repr’, ‘reversed’, ’round’, ‘set’, ‘setattr’, ‘slice’, ‘sorted’, ‘staticmethod’, ‘str’, ‘sum’, ‘super’, ‘tuple’, ‘type’, ‘unichr’, ‘unicode’, ‘vars’, ‘xrange’, ‘zip’]

I think this will be useful for you people to know what are builtin attributes of python interpreter.

If you want to get help about any of the attributes,

>>> help(len)
Help on built-in function len in module __builtin__:

len(object) -> integer

Return the number of items of a sequence or mapping.

Send an email by commandline using python script

Today, I thought to write a script for sending an email by the command line . I selected “python” as the language . Below is the script to do the same.

# Humble Devassy humble.devassy@gmail.com
# This is a simple script to send an email
“”” This is the script to send an email”””
import sys
import smtplib

From = raw_input(“From:”)
Toaddress = raw_input(“To:”).split(‘,’)
print “Enter message , Once you have entered the content exit with [Ctrl]+D”
body = “”
while 1:
line = sys.stdin.readline()
if not line:
body = body + line
server = smtplib.SMTP(‘localhost’)
server.sendmail(From, Toaddress,body)

print “%s-%s” %(From, Toaddress)
if __name__ == ‘__main__’:
print ” “

Ahhh…. U have to take care of python indentation.. 🙂