Search This Blog

Wednesday, July 14, 2010

Using python with Gnumeric in Windows XP

Background Screenshot-20100715054119Thu.png


Quite sometime ago, I had download Gnumeric as a portable spreadsheet solution. It is a nifty application that loads up fast and does what spreadsheets do. At the right is a screen shot of the memory usage of my Portable Gnumeric.


Side Note: I'm using Process Explorer to show you the stat. It is a great app which I think should be installed by default on every windows machine. Some explanation of what you see in the diagram. Private Bytes is the the memory that can only be accessed by the application, wheras Working Set = Private Bytes + Shared Memories.


Then I read that Gnumeric provides Python integration! But my initial tries to enable the python integration using the instructions from here failed. The instruction is geared to a Linux setup but it can be done on XP as well. And the rest of this post is about how I got it working.


My Setup


I'm using version 1.10.5 of Gnumeric. I'd downloaded my original version from portable appts and updated Gnumeric to the latest version.


The run down


I will tell you the run down to get the python integration working. Then I will talk about some of the errors that you might encounter.



  • Make sure that you have at least python version 2.6 installed. Gnumeric python integration needs python version 2.6. I'd tried using Python 2.5, but no go.

  • Make sure that you've installed the Py-GTK python module. Py-GTK can be found here, and it, in turn, needs 3 other python modules call PyGTK, PyCairo and PyGObject. So you need to individually click on the links to the 3 modules on the page and download and install them. And then....

  • Make sure that GTK is installed as well. This is simply a matter of going here and download a release then unzipping the package someone on your machine and adding the path of the bin subfolder to your path. i.e. you should see the following



C:\>set path


Path=...\gtk\bin\;...



And Success!


If everything goes smoothly, after start Gnumeric, goes to menu>Tools>Plugins scroll down to the check the 2 python related boxes. Then you should see a new Options appear under menu>Tools> called "Python console". Activate that and you should see the following.


Screenshot-20100715063554Thu.png


Possible Problems


If your Gnumeric crashed with a Windows Error message, probably one of the following occured.



  • Python, is not installed

  • Incorrect version of python is installed.

  • PythonHome is not specified.

  • GTK is not installed

  • GTK\bin is not added to %PATH%


And finally


For ideas about what you can do with Python plugin in Gnumeric, please refer to this page as mentioned above.


I hope you managed to get your Python setup for Gnumeric. And use the beautiful language that is Python to simplify your spreadsheet scripting. And did I mentioned that both Python and Gnumeric are opensourced? :)


Created : 2010.07.15.0647hrs(Thu);




Technorati :

Del.icio.us :

Saturday, July 10, 2010

Tiramisu

http://www.heavenlytiramisu.com/whatisit.htm




wow, fantastic description.. I must try it. and maybe learn to create heaven.

Monday, July 5, 2010

Facebook Cafeworld tip - turn off the eating sound

This is not the kind of productivity improvements that I have in mind for this blog. Game productivity is certainly also a kind of productivity. So here goes.



I'm sure FaceBook needs no introduction. Cafe World is a game within FaceBook where you run a restaurant by taking care of its deco, staffing, and primarily, by cooking a variety of dishes. Along the way, you upgrade earn cafe points which will allow you to upgrade your Cafe.


Background


Different dish requires different duration for cooking - from 5 mins to even more than a day! So there's plenty of clicking cooking to occupy your time.


You can actually close the page and the game will keep on running. However, the loading for the game sometimes will take a while. So, more often than not, I will leave the Cafe World running in the background while I do other work. Waiting for the distinctive chime of the food bell informing me that the cooking is done.


However the convenient chime comes with the irritating background noise of the restaurant - people eating, cash register tinkling etc. Not exactly optimal when you are trying to concentrate on other task. Yet when you turn off the sound option from within the game control, all the sound will be turned off. What to do?


The solution.


So I accidentally chance upon the solution. I'm sure the developer folks at Facebook must have deliberately designed it this way. You just need to click the "Save" button to eliminate the restaurant noise. The "Save Complete" box will pop up. But just leave it there. Now, alternate tab and do your other stuffs. i.e. Listen to your mp3s. When the food is done, you will still be able to hear the food bell chime!


So now, have fun cooking minus the noise!

Tuesday, May 11, 2010

Bioluminecence

I was reading this article http://news.nationalgeographic.com/news/2010/05/100506-bioluminescence-sea-life-embed-video/ when I got into thinking about the reason for bioluminescence.




My hypothesis is that any living things must have a sense of self, and in the murky depth of the sea, being able to see oneself is a huge help to contributing constructing this sense of self.




Of course, there is the somewhat conflicting observation that most dark dwellers are somewhat blind. This could be explained in that once the sense of self is formed by the young, the sense of sight becomes less important, thence it degenerated.