October 31, 2007
When I was just peeping into the discussions at #python, I saw a few talking about ipython. On first look, I thought it to be Iron Python stuff but was wrong. It is an (another?) enhanced Python Shell or what we otherwise call as Interactive Python Mode. The good thing with these stuffs is you can just download and try them, not much a paining process to get them working. Hence I went for it.
Features
- Dynamic Object Introspection : We can access docstrings, function definition prototypes, source codes of modules, source files and a lot more dynamically.
For example, after importing `os` module, typing os.path?? or os.path? gives complete source code and description of the os module respectively. Similarly `%pdoc object`gives us the object’s doctstring information.
- Local namespace completion with TAB press.
- Numbered input/output prompts.
In [1]: print “Hello World!”
Hello World!
In [2]: (1+2)*3
Out[2]: 9
- User-extensible`magic` commands (type %magic for information).
- System shell access with ! prefix.
!ls will issue the `ls` command in the system shell and print its output.
- File system navigation with %cd command.
- Verbose and colored exception traceback.
- Auto-parenthesis.
>>> callable_ob arg1, arg2, arg3
and the input will be translated to this:
–> callable_ob(arg1, arg2, arg3)
>>> ,my_function a b c # becomes my_function("a","b","c")
>>> ;my_function a b c # becomes my_function(”a b c”)
- Embeddable within other python code/modules.
Installation
I always prefer the `svn checkout` way of getting the source code. We can get to know more about ipython at its home site. We can also get pythonreadline from the same site, which helps us to have features like color, tab, completion, etc. (I read somewhere that it is not needed for ipython as it implicitly has pyreadline). The following are the steps to install ipython from the svn repos as a local copy,
- We can get the source code by doing an svn checkout,
svn co http://ipython.scipy.org/svn/ipython/ipython/trunk ipython
- We need to get into the checked out source directory and run the following command
python setup.py install
- The –home option can be used to specify a directory to install the ipython, else it will install in the default python directories.
python setup.py install --home /home/myuser/python/ipython
- If we are using –home option, then we need to add the following line into our.bashrc. Else we need to export the PYTHONPATH variable every time adding the path of our ipython/lib/python installation to it.
export PYTHONPATH=/home/myuser/python/ipython/lib/python
- We can run ipython by executing ipython/bin/ipython from the shell (or create a link pointing to this file).
The complete documentation can be obtained as pdf as well as viewed as HTML.
1 Comment |
Criticism and Reviews, Linux and FLOSS, Python | Tagged: interactive, ipython, Python, shell |
Permalink
Posted by technofreak
October 20, 2007
I still have the memories of doing beta testing for Edgy and fighting daily with broken packages. It was an awesome experience, which helped me learn a lot of packages, upgradation, pre and post installation processes and how to face problems out of a broken package. Feisty has started become something of the past, similar to Dapper and Edgy. Now what every one speaks about, writes about, discusses about is Gutsy Gibbon.
This time I missed all the fun of upgrading during the beta days and doing testing, reporting bugs, helping out others fix issues and many more things. The reason is I do not have the luxury of Internet connection at home in Bangalore, as well as we have bandwidth issues in office such that I don’t want to trouble my admins by adding extra load.
Thus I made my trip to Chennai for Dusshera holidays mainly to upgrade my Helios from Feisty to Gutsy. I landed here on the day when the world was busy upgrading to Gutsy. Hence the load was more on the apt mirrors that when I started the download last evening, it took almost 18 hours to finish the whooping 1.65 GB download. I had to wait for additional couple of hours for it to finish the install. But nothing goes without troubles, this time exim4 package’s configuration process was giving me errors and it was messing up the whole upgrade.
I had to resolve to running `dpkg-reconfigure -a` which started configure every piece in my Ubuntu installation. It took 50 minutes to finish up the reconfiguration and finally I cleaned up unwanted stuffs with `apt-get autoremove`. Then I went for a reboot to boot with the new 2.6.22 kernel and my new Gutsy desktop.
I boot in, welcomed by my usual login screen. Nothing new or unusual. I login to KDE to find most things same other than a few icons and menus. I was told it will remove beryl but I still find it there. Then I went to check the GNOME desktop as I had no clue of where the compiz was in KDE. As I knew where to enable the compiz effects in GNOME (Preferences –> Appearance ), I turned them on to find the new desktops effects appear. GNOME is fine but what I need is KDE, so I relogged into KDE to see how it works there.
There is no menu option in KDE, and hence one good way is to add “/usr/bin/compiz” to .kde/AutoStart/ as a symbolic link. This makes compiz to be started when we log into KDE. But I still face the issue I had in Beryl with the multiple workspaces showing a distorted look when changed to and back between compiz and None. Also, if I select 4 multiple desktops in `Desktop preferences`, it produces 8 workspaces but only two of them works with compiz. *sigh* Tried to make things work, but having lost interest any further turned off the compiz thing and removed it from AutoStart.
The other cool things with Gutsy are newer version of OpenOffice (which I don’t care about), Gimp and the Gaim instant messenger now known as Pidgin. One more thing to feel good is the pop ups we get when Thunderbird gets a new mail. This is really useful when you are working in some other workspace and don’t have a audible ping turned on. Yet to try with the new Strigi desktop search (is it new? may be for me). The kernel is now 2.6.22.14 which is another good thing.
Am yet to check other things like bluetooth which people have reported to have improved a lot,as well as things on the KDE side. Will report them once I find them, as well as more bugs here and there as I encounter. For those who are still waiting to upgrade to Gutsy, just do it buddy without any second thoughts. Good luck and Congratz to the Ubuntu developers team and MOTUs for another awesome work 
1 Comment |
Criticism and Reviews, Issues and Bugs, Linux and FLOSS, Problems, Upgradations and Installations | Tagged: Ubuntu, release, upgrade, gutsy, review |
Permalink
Posted by technofreak
October 20, 2007
When I joined Comat this August, the project which I had to start contributing was RBC TCConfig. Though this was started as a internal project for telecenters that comat was operating all over rural Karnataka, soon it had the potential to become a separate product with indivual value. Thus a couple of days ago, jace moved a part of the project code to Google Code. Now it stands as an Open Source project.
RBC TCConfig stands for Rural Business Center - Telecenter Computer Configurator. This was initiated to configure and manage the rural telecenters which are at a minimum of 4 kilometers from an urban area, where it could get technical support, which happens to be places having frequent power outrages and system meltdowns, connected by intermittent or low bandwidth networks. Thus managing these remote rural centers becomes a vital task for some one operating these RBCs. RBCs are places where technology is used to serve the rural people, especially in providing basic government services like issue of birth/death certificates, IRCTC booking services, Bus ticket booking services, land record document service and many more. If not the RBCs, the rural people have to spend a lot of time in the government offices in their local taluk head quarters which needs a lot of patience and most time proves to be a bit unnecessarily expensive too.
Thus, we were working on a management framework to configure and administrate these remote computers which are very far from our physical reach. We basically developed this framework to work on a GNU/Linux machine as the base operating system, if required there is a provision to run M$’s proprietary operating system on top of a virtual machine. The main features of this management system are remote monitoring, remote updates and installs, and remote administration of the computers. We have been facing many challenges during this project, which is still in its early ages with a lot of things to be improved from their current state.
The Google Code project for the same is an endeavor to share this experiences and make it open so others can pick it up, tweak it to their needs and implement as a solution to similar requirements of remote management of computers. We hope this will open up more suggestions, interesting ideas to improve our current framework and some free contribution as well.
Though I am a member of this project, the right person to contact for knowing more specific and technical information about this project is Kiran Jace. But you are most welcome to put your comments to this post if you have anything to say about our project. He had indeed plans to speak about this during the foss.in 2007 schedules to happen this December, but unfortunately his talk got rejected stating it is not yet an FOSS project. Hope we will soon be able to get a recognition of ours as a FOSS project,of value, considering the need to take technology to the rural parts of India. 
2 Comments |
Do You Know ?, Linux and FLOSS, Pointers | Tagged: rbc, tcconfig, comat, googlecode, foss, project |
Permalink
Posted by technofreak
October 12, 2007
Every programmer or rather every application developer, let it be a simple web app or a GUI, needs to design his application not sitting in a developers’ chair but from the end users’ chair. If he starts developing it from his very own PoV as a developer, things get geeky as well as too technical that the usability of the app is going to suck big time when put into real use. This is because, unless he does his work from the end users’ PoV he is not going to understand how his app should interact with the end user as well as his app is not going to give back something which the end user wishes when using his app.
I have heard this point being stressed a lot of times, especially by people who have guided me till now in various projects. You don’t assume yourself to be intelligent, neither the end user to be stupid, but you have to assume yourself to
be intelligent very similar to your intended end user. Why am I writing this all of a sudden is, I and my colleague were developing a simple user log mechanism and we had to start thinking about how the end user, how is going to be very much a non-technical person, can interact with and use our interface. This helped us find some small small things which we had overlooked, but would have otherwise messed up our entire application itself. We had to think of ways to make it easy for the user to give us data, which is also easier for us to process and give him the service he wants.
Thus, all of a sudden I realized the importance of sitting in the end users’ chair if I want to develop products with good end user usability.
1 Comment |
Concepts, Ideas and Theories, Just Scribbles | Tagged: realization, developing, enduser, usability |
Permalink
Posted by technofreak
October 12, 2007
Time to run the update manager as the Release Candidate for Ubuntu 7.10, codenamed Gutsy Gibbon, is out. We have waited for 6 long months for this and I hear Ubunteros say that it is indeed stable for any one to give a try. With just a week more for the final stable release, it is not a bad time to upgrade your Feisty machines. My Helios is waiting for me to go home (Chennai) and upgrade it to Gutsy. Heard some nice stuff are available for GNOME and my favorite KDE desktops, such as Dolphin file manager, newer version of Amarok, Compiz Fusion for desktop eye candies (hope it works well with KDE also, I have problems with Beryl-KDE), Gnash for Flash and interestingly Firefox plugin installer.
Want to know how to upgrade? Refer here. Want to know more about what got changed ? Refer release notes. Want to know the new things in Kubuntu 7.10, check here. And be ready for the Gutsy party.
In addition to this, Ubuntu is having its Open Week this month from 22nd to 27th, at #ubuntu-classroom @ irc.freenode.net. There are interesting things like ‘Ask Mark’ and Holbach’s Packaging tutor session. Check Jono’s post for more info on this 
3 Comments |
Linux and FLOSS, Ubuntu | Tagged: gutsy, release, Ubuntu, upgrade |
Permalink
Posted by technofreak
October 4, 2007
Long since I looked at what commands I frequently use, I decided to re-run that small command I got to learn some months ago. This shows am working a lot on files and that too on some other machine through networking
$ history | awk ‘{print $2}’ | awk ‘BEGIN {FS=”|”}{print $1}’ | sort | uniq -c | sort -n | tail | sort -nr
142 ls
64 cd
60 vim
36 exit
25 sudo
24 ssh
15 scp
14 find
13 svn
13 apt-cache
No Comments » |
Bash and Shell Scripts, Hacks and Codes, Just Scribbles | Tagged: bash, history, top commands |
Permalink
Posted by technofreak
October 4, 2007
Wanted to copy all my EPM .list files to a separate folder so I can do a bit of edit and test with it. Wanted to do it in a true geek mode and hence decided to make use of bash’s find command (Thanks to floyd_n_milan for introducing me to this wonderful command). Since it some time I really used `find`, I had to do a bit of Googling to find I needed. This might be a piece of piss for seasoned Bash’ers but for me it was a chance to revive my detoriating Bash knowledge and as it always happens, I love to post newbie stuffs.
$ find ./myproj/pkgs -name \*.list -exec cp {} epm-list/ \;
This command searches the myproj/pkgs directory (within current directory) and its sub-directories for files ending with .list. Upon each file found, it executes the `cp` command copying the file to the directory epm-list. The {} is replaced by the name of the file found (each time).
Please note the escaping ‘\’ before the ‘*’ in the regular expression and before the trailing ‘;’. If you miss the trailing semicolon or the escaping, bash will complain that the -exec has no options. We need not put `epm-list/{}`, it uses the file name automatically (if we use {} then it tries to put the file in epm-list/<path-where-the-file-is-actually-found> which ends in a path not found error).
2 Comments |
Bash and Shell Scripts, For n00bs, Hacks and Codes, Techy Tips and Tweaks | Tagged: bash, copying files, cp, find |
Permalink
Posted by technofreak
October 3, 2007
Actually I was planning to be a volunteer for freed.in, but at the end couldn’t even be a delegate. When all my buddies had a great time together at this great event, I was sitting at my home doing household. Thanks to my current financial status, I couldn’t spend on the travel. Hope to meet all those people (at least most of them) during foss.in this December. Still freed is freed, it is unique. Wish I would be able to volunteer for freed.in 2008 at least.
Talked with Matthew Barker of Ubuntu yesterday and our hopes of having Jono Bacon has increased, as he will also be trying from his end. And there might be a surprise for all Ubunteros too, with our leader making his presence for the event. Though not very much sure of this, we will try our best luck. Also, Ubuntu is interested to be one amongst the sponsors for foss.in 2007 and if it happens, might get a booth for us to display Ubuntu 7.10. Also, we might get some Ubuntu goodies for the team.
We have started preparations for the Debian/Ubuntu Project Day as only 2 more months are left. We need to decide on a schedule between the two teams (Debian-In and Ubuntu-In) and having commoners like Kartik is of great help in this. We need to conclude on a list of speakers and then they need to apply through CFP. Lot of things to get done and we need the other members to pitch in their efforts too (Wake up from your hibernation dudes, its high time!)
Go, Ubuntu Go!
1 Comment |
FOSS Community Activities, Linux and FLOSS, Meets and Conferences | Tagged: foss.un, freed, project day, Ubuntu |
Permalink
Posted by technofreak