Convert & Import .XLS Excel File to .SQL Format with PHPMyAdmin

Converting an Excel file to .SQL file is easily achieved in PHPMyAdmin. Contrary to what some sites seem to suggest, you do not need any conversion software for this. The steps involved are as follows: Step 1: Optimize your Excel File Before you convert the .xls file, you may consider a cursory glance to ensure […]

PythonPath for Modules & Packages – Import Error: No module named “…”

Python offers Modules & Packages(directory of modules) for using third-party codes in our program without having to reinvent the wheel. However, when i started with python -I had a hard time figuring out how to import third-party modules & packages into my program. Here’s a gist of what I finally learnt: Know the Python Path […]

Making Scrollable Text Area with Tkinter | Python Tutorials Example

Tkinter text-area widget natively does not have class for Scrollable Text Area. However, we can easily make one by using the text area widget and the scroll widget together. Here’s the code: from Tkinter import * class scrollTxtArea: def __init__(self,root): frame=Frame(root) frame.pack() self.textPad(frame) return def textPad(self,frame): #add a frame and put a text area into […]

What’s New in HTML 5 | Fun things you can do with HTML5

HTML5 – the 5th major revision of HTML is a class apart from its predecessor HTML4 – both in terms of features and ease of use. And what better way to learn the new features in HTML than by trying and seeing it for your self. To explore the new features in html5 – simply […]

Use-Case reuse: Extend vs Include generalization in UML

Two commonly used relationships to indicate potential reuse in UML use case model are <<include>> and <<extend>>.  Commonly speaking, <<include>> is used when usecase A is mandatory for Usecase B while <<extend>> is used when usecase A is optional for use case B. However this is a very simplisitic definition of the interaction between the […]

Download Python 2.X Cheatsheet & Reference Guide

Indentation: tab: 4 spaces – nothing more, nothing less./ dont mix spaces with tab. Python is very specific about indentation. Comment: # a single line comment, “”” a multiline comment – in 3 quotes”” Case Sensitivity: Letter case matters in Python. ‘foo’ & ‘Foo’ are different variables. Quotes: You can use single quotes between double […]

‘if __name__ == “__main__” | Python Coding Basics

Use of: if __name__ == “__main__”: in any python program enables the use of the same file either as an independent program or as a imported module within another piece of code. For example: if __name__ == “__main__”: print “i am running as an independent program” else: print “i am running as an imported module” […]

Unit Testing In Python with doctest

What is doctest ? A doctest is an inbuilt standard function in Python that lets the programmer check the validity of part(s) of program by giving results for some common test variables. In other words, doctest is in the in-built python module and tool for unit testing which lets the program verify, if a given […]

Modules vs Packages vs Libraries in Python

The terms ‘module’, ‘package’ & ‘library’ are defined differently by different programming languages. This may cause some confusion for programmers switching from one language to another. Here’s how these three terms are used in context of python: Module: Simply put, a module in python is a .py file that defines one or more function/classes which […]

Python, Tkinter GUI Practical Examples Tutorial

Tkinter is a simple to use, cross-platform(Linux/Windows/OSx) GUI program – the only built-in GUI packaged with Python. It is designed on Tcl/Tk -a popular open-source GUI scripting language for a wide range of programming languages ( c, C++, Perl, PHP, Ruby etc.). Here’s how to get started with Tkinter: Example 1: Introducing Root Window Tkinter […]