Some of my Linux for You articles

Here is the link for some of my Linux for You articles published in print and now hosted on their site:

http://www.linuxforu.com/author/ankur-kumar-sharma/

Python and Instant GUIs

PythonAndInstantGui.pdf Download this file

Hi All,

 

Here is my original print article published in Linux for You magazine on Programming Instant GUIs with Python.

 

LINUX For You Magazine http://www.linuxforu.com/

Spicing Up Console for Fun and Profit – 2

Spicingconsole2.pdf Download this file

Hi All,

 

Here is my original print article published in Linux for You magazine on Programming Command Line GUIs.

 

LINUX For You Magazine http://www.linuxforu.com/

 

CC BY-SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/

Spicing Up Console for Fun and Profit

Spicingconsole.pdf Download this file

Hi All,

 

Here is my original print article published in Linux for You magazine on Tweaking Console Terminals and Command Line GUIs.

 

LINUX For You Magazinehttp://www.linuxforu.com/

 
CC BY-SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/

 

Extending Python via Shared Libraries

Hi All,
Here is the original print article published in Linux for You magazine on Python and C/C++ interaction and the associated errata.

Errata:

Page Column Para Line Replace with New text Remarks

43 1 5 7 method of the CDLL class method of the cdll object cdll is a loader object from ctypes,

43 2 5 11 c_ushort(-3) c_ushort(3) unsigned short with signed data provides improper result,

44 1 8 1 GCC gcc gcc is the command for GCC,

44 2 2 2 generates a C generates a C/C++ SWIG generates C or C++ wrapper file,

44 2 2 10 C wrapper C/C++ wrapper -do-,

44 2 5 4 testmodule.so _testmodule.so SWIG shared library naming convention,

44 2 3 4 hpp and hpp, testmodule.cpp and source file name missed,

44 1 Note – - This setting works only in the current terminal and the login session. If you want to get this effective in any terminal on every login session, add the line export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH in your .bashrc and then issue commands sudo ldconfig and . ~/.bashrc .

21_Extending Python.pdf Download this file

Turbo Charge Python Apps with Speed – Part 1 and 2

Hi All, below are the links for my article series on speed optimization for Python Apps, originally published in Linux For You :

PyMakeMeLazyNDumb an automation tool for geekz, v0.0.6 released

The v0.0.6 of PyMakeMeLazyNDumb is an enhancements release and it carries some improvements over v0.0.5 . The download links for the project are : 

 

 

GeeksZine December 2010 Issue

It’s a pleasure to present the 6th issue of the GeeksZine and hope that we’ll keep on improving and delivering the zine for many more years to come. This issue of the zine consists of Turning your old machines into development workhorse using PuppyLinux, Text processing with power tool Sed and a writeup on the current release of PyMakeMeLazyNDumb. Also there are regular News bytes and Tips n tricks sections for you. A big thanks to Richard StallmanLinus Torvalds and all the Geeks there to pamper us with FLOSS and make the GeeksZine possible. FLOSS Rulz!!!

PyMakeMeLazyNDumb an automation tool for geekz, v0.0.5 released

The v0.0.5 of PyMakeMeLazyNDumb is a bugfix release and it carries some improvements over v0.0.4 . It also contains the help file in pdf format. The download links for the project are :

PyMakeMeLazyNDumb an automation tool for geekz, v0.0.4 released

The v0.0.4 of PyMakeMeLazyNDumb contains :
pygenericroutines.py is a generic python module that comprises of several general purpose routines required most of the times by python automation tools. All the components of PyMakeMeLazyNDumb are based upon it heavily. The v0.0.4 of the module carries a fix over v0.0.3 .

 

pycreateflswthdr.py is a python app that creates various files having .c, .h, .cpp, .hpp, .java, .py, .pl, .rb, .lua, .php, .sh, .mak, .sql extensions with appropriate commented information headers. Some of the generic fields of the commented info headers are filled automatically. So use this simple but effective app next time when you want to generate files you or others could track later on. The version 0.0.3 of the app also supports the configuration file feature to fill some of the entries in information header.

For example – if you want to generate example1.c, example2.py, example.sql files in your home directory then the command to type is :

python pycreateflswthdr.py -d ~ example1.c example2.py example3.sql

If you want to append an info header to an already existing file then the command to type is :

python pycreateflswthdr.py -a example4.mak

If you want to stuff Author, Download link & License entries (these are the common fields among generated multiple files) in the generated information header(s) as per your choice then create a text file config.conf in the current working directory with entries as shown below :

# test config file for PyMakeMeLazyNDumb

[pycreateflswthdr]

Author        = Ankur Kumar Sharma
Download link = http://richnusgeeks.wordpress.com
License       = Public Domain

here pycreateflswthdr is the section name contained in the square brackets and Author, Download link & License are the entries for which you want to use
your values instead of the automatically generated values. For example – if you want to generate (for append use -a option as shown above) example5.lua, example6.cpp, example7.rb with values taken from config.conf then the command to type is :

python ptcreateflswthdr.py -c example5.lua example6.cpp example7.rb

To see the usages of the app, the command is :

python  pycreateflswthdr.py -h

The app backs up existing files both in creation and append modes with extension .bak.timestamp .This app logs all the warning and error messages in a log file named activity.log in the current working directory from where pycreateflswthdr.py is invoked. Once this log file is created, all the subsequent warnings and errors are appended to it.

pycreatemyspace.py is a python app that creates an hierarchy of directories as per user provided arguments. A good directories hierarchy is the simplest way to effectively manage data so this app makes it easy to store and track your otherwise scattered data. You can mention the list of directories and subdirectories to be created on the command line itself or the app can read the list of the directories and subdirectories from a config file. You can also mention the destination directory where all these directories and subdirectories are created.

For example – if you want to create directories dir1, dir2, dir3 in the current location from where you run pycreatemyspace.py then the command to type is :

python pycreatemyspace.py -p ‘dir1 dir2 dir3′

If you also want to create some subdirectories in every created directory then the command to type is :

python pycreatemyspace.py -p ‘dir1 dir2 dir3′ -s ‘subdir1 subdir2 subdir3′

If you want to create your directories and subdirectories in your home directory then the command to type is :

python pycreatemyspace.py -d ~ ‘dir1 dir2 dir3′ -s ‘subdir1 subdir2 subdir3′

If you want the directories and subdirectories to be read from a configuration file then create a text file config.conf in the directory from where you run pycreatemyspace.py as shown below :

#test config fle for PyMakeMeLazyNDumb

[pycreatemyspace]

Directories = dir1 dir2 dir3
Subdirectories = subdir1 subdir2 subdir3

now the command to type is :

python pycreatemyspace.py -c

To see the usages of the app, the command is :

python  pycreateflswthdr.py -h

The app only creates non existing directories and subdirectories from the listing provided so your existing directories and subdirectories are always safe even if you include those in the listings. This app logs all the warning and error messages in a log file named activity.log in the current working directory from where pycreatemyspace.py is invoked. Once this log file is created, all the subsequent warnings and errors are appended to it.

The download links for the project are :

Follow

Get every new post delivered to your Inbox.