Solar is a theme for Python Sphinx.
Eclipse was my IDE of choice. I liked the Python support with Pydev extension, Git integration, multiple project management and Task/Todo support among other things. I have written about some of these before.
What I didn’t like was the high memory usage. Tried a number of things - updating Eclipse and JDK, making sure 64-bit Java is used for the VM, disabling or removing features/plugins not used and closing unused projects. It didn’t help much - ~300MB RAM with a single project opened in workspace!
I have been using Vi/Vim for a long time (~10 years) but only for simple tasks. I even got a book but the learning process was slow. On second thought, I realized it will be quicker if I noted down the features I wanted and focus only on them. So, I came up with this list
- Python, Pylint integration
- Git integration
- Debugging python code
- Execute shell commands
- Find and replace
- File explorer
- Working with multiple files
- Project management
- Help and autocomplete
- Tasks integration
I’ve got most of this setup thanks to some really good blog posts, wiki articles and stackoverflow posts [see Links below]. Here is my vimrc. I use solarized for the color scheme and Inconsolata font at 10pt.
Find and highlight occurrences of a word
* while cursor is on the word.
To remove highlight, use
Close a file
Also known as delete a buffer.
Print margin at column 80
This is useful if you want to restrict the number of characters per line.
For more information, check “Right margin in Vim”
Display line number
Diff of 2 files
:vert diffsplit second_filename
This did not work on the windows version of vim 7.3. Remove or comment out
vimrc. You will then need to install
diff. I used
diff.exe that came
with Git. For more information check
No Qt development (
qt-devel) RPM in the SLES 10 SP1 DVD.
The devel files were part of the SDK. Could not download SLES 10 SP1 SDK from Novell (No longer available). The official installer did not work.
./Qt_SDK_Lin64_offline_v1_2_en.run: /usr/lib64/libstdc++.so.6:version `GLIBCXX_3.4.9' not found (required by ./Qt_SDK_Lin64_offline_v1_2_en.run)
libstdc++ at the moment!.
How I got it installed
Downloaded the latest available SDKs for SLES 10 from Novell http://download.novell.com/Download?buildid=JETn_0Tw_XM~
qt-4.3.4-0.7.1.src.rpm from the 2nd DVD iso
Built RPM from the source RPM
rpmbuild -bb qt.spec
This stopped with error: Failed build dependencies:
cups-devel is needed by qt-4.3.4-0.7.1.x86_64 libjpeg-devel is needed by qt-4.3.4-0.7.1.x86_64 libmng-devel is needed by qt-4.3.4-0.7.1.x86_64 libtiff-devel is needed by qt-4.3.4-0.7.1.x86_64 dbus-1-devel is needed by qt-4.3.4-0.7.1.x86_64
Installed all the above packages using
Compile was successful but these rpmbuild errors occured
Due to a bug in
unpackaged files found
Updated spec file to include them in sql package.
Removed existing Qt installation and installed new RPMS
zypper rm qt qt-qt3support qt-sql qt-x11
RPM’s installed in this order
qt qt-sql dbus-1-qt qt-x11 qt-qt3support qt-devel
You can download the RPM spec file from http://db.tt/3y0MzGpY
The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.
Here’s an excerpt:
The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 31,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 11 sold-out performances for that many people to see it.
Some things I’ve learnt recently.
Simple boolean function to check if a column exists
Identify duplicate values in columns
col1 is an integer but I wanted it formatted as text in my python script
This is a tutorial I delivered at PyCon Ireland 2011.
A quick introduction to developing a GUI to a command line program using PyQt. I used the sphinx-build command from Sphinx documentation project as an example.
The basic command for generating HTML documentation from source is
sphinx-build sourcedir outdir
A GUI (dialog) was designed using Qt Designer to replicate the functionality of the command above. This was then converted to Python code and then a main application was written to make use of the dialog.
Slides for the talk: slides.pdf
Code repository: https://github.com/vkvn/sphinx-build-qt/
You can clone the repo using
git clone git://github.com/vkvn/sphinx-build-qt.git
and checkout like this
This code works unaltered on Windows too. Thanks to Qt! You would need to have the
C:\Python2*\Scripts in your PATH or wherever you’ve got
This was a short introduction on using Python with SQL databases that I delivered to a group of visiting researchers.
Slides : python-databases.pdf
- Python modules for working with databases
- Client software
- Create and connect to a database
- Create a table
- Inserting a row
- Inserting multiple rows
- Retrieving data
- Updating data
- Example using pyodbc
Just created a repository for the Sphinx themes I have been creating for various documentation projects. These themes were created by modifying base themes included with Sphinx. Here are some screenshots.
Agni (means Fire)
Jal (means Water)
VLinux-theme (used for the VLinux project)
You can clone or fork the github repo.
How to use
- Download the zip file of the theme you want to use and uncompress the archive.
conf.pyof an existing Sphinx project or create a new Sphinx project using
- Change the
html_themeparameter to match the theme name (agni, jal or vlinux-theme).
- Change the
html_theme_pathto location of the downloaded theme.
CyanogenMod 7 (Android 2.3/Gingerbread) port for Milestone is now available (RC4, but quite stable) - http://android.doshaska.net/cm7
Instructions to update are similar to what I have posted before except there is no need to install OpenRecovery and all three data wipe options should be used including Factory reset.
NOTE: This is going to wipe out all your data. So, backup first!
Also, latest version of Google apps for CM7 needs to be installed.
Honeycomb live wallpaper from Android Market
Power control, Google search, Beautiful Widgets, Google Reader and LauncherPro
Analog Clock from the Honeycomb theme
Also includes Music widget.
New icons from Honeycomb theme
I was trying to do this today and came across couple of different ways
of including content from other documents. My first attempt was to use
.. literalinclude:: but that is only good for including code or text.
What I wanted was to include sections from other documents into the current
document so that any changes made in them will also be reflected in the
document where it was included. This can be done using the
Lets take this document
usage.rst as an example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Lets say you want to include the Command section. Mark this section by
adding markers like this. In this case
is used. This is not really necessary and any string could be used as a
marker but I feel this gives better control as to what is included.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Spacing is essential.
.. at the beginning of a line makes it a comment. It will not be included in the final document
To include this section in a different document, add this
1 2 3
/ in the beginning of the path refers to the top level i.e., the ‘source’ directory.
If the file is in the same directory, just filename is sufficient