Sunday, April 17, 2016

Creating a Desktop SMS Application with wxPython

Lets Create a very simple and basic desktop SMS app with wxPython for python 2. Before we continue, you will need to create an account with a Python SMS gateway providers.

Am going to use an SMS gateway call twilio, check this post to learn how to setup account with twilio SMS gateway.

Now, our wxPython code for this app is as below; if you want to learn how it was done click here.

With python2.7 and wxpython installed on your machine, copy the code below and save it in .py file and run it. You will get an interface similar to the one below;-

Friday, April 15, 2016

Sending SMS/Text Message with Python Script

How to Send an SMS/Text Message with Python

Text messages are more immediate and reliable way of sending notifications than email as most people are more likely to be near their phones than their computers.

Some Python SMS gateway providers are listed below:-

In this tutorial, you’ll learn how to configure an SMS gateway service and use its Python module to send text messages. You will be creating an SMS/Text Messaging Script with Python.

There are several SMS gateway services to choose from as listed above; however I am going to use SMS gateway service called “Twilio”.

Twilio is an SMS gateway service, which means it’s a service that allows you to send text messages from your programs (this program can be a desktop, mobile or web application). I will use the FREE trial service for this demonstration, feel free to upgrade if need enhanced services.

Twilio SMS texting services are available in several countries, but the specifics in this tutorial are for Nigeria.

Lets get started...

Install Twilio Python Module

Before signing up for a Twilio account, install the twilio module by running:

pip install twilio

If your Windows-PC is connected to internet, the twilio module will be downloaded and installed on your default python installation.

Signing Up for a Twilio Account

Go to and fill out the sign-up form. Once you’ve signed up for a new account, you’ll need to verify a mobile phone number that you want to send texts to. (This verification is necessary to prevent people from using the service to spam random phone numbers with text messages.)

Monday, April 11, 2016

AutoCAD Alternatives - for students and startups

There is no doubt whatsoever that AutoCAD is the most used Computer Aided Design program for people who need to create 2D and 3D drawings and diagrams, especially in industries such as architecture, interior design and engineering.

In this part of the world (Nigeria, Africa), AutoCAD is the most preferred option when it comes to choosing Computer Aided Design (CAD) software.
Some of the reasons that may push you considering other Computer Aided Design (CAD) software alternatives over AutoCAD include:
~ High cost of AutoCAD license
~ AutoCAD requires high volume of System Capacity and Configurations
~ Steep Learning curve of AutoCAD

With all these and other possible reasons in mind, I present to you Great Lists of Alternative CAD software to AutoCAD

Tuesday, April 5, 2016

Processing HTML form data with Python and PHP Script

In today's post, am going to work through "how to Process HTML form with Python and PHP Script".

Html forms on websites are processed using a server-side programming language such as PHP, Python, Ruby, Java, Asp, Perl etc. Therefore, your website server most have support for the programming language you wish to use in processing the form.

In this tutorial am going to use Apache web server on a local windows PC. You can run Apache on Windows via easy to use tools such as WAMP, XAMPP, or AMPPS.

I assumed you have the XAMPP web server and Python2 installed. However, you are free to use any of the web servers listed above with the compatible version of python.

Let's get started....

Html form

The html form we are going to use has just three (3) elements; two text fields and a submit button. The code for the form is as below;-

Note that the "action" attribute is empty, it most be changed accordingly in the next step for php or python.

Now go to your XAMPP htdocs directory and create a folder name it "project". That is your location will look like this: C:\xampp\htdocs\project. Copy the html code above and save it in a file named "myForm" with .html extension at this location "C:\xampp\htdocs\project" then move to the next stage of this tutorial below.

Result of the above code file on the browser is as the image below;-

Your file location should look like: http://localhost/project/myForm.html

Getting Started With Python Programming in GIMP

GIMP is a Free & Open Source Image Editor, an alternative to PhotoShop. GIMP has good support for python programming. This means you can extend the functionality of GIMP software or automate processes using costume scripts written in python.

To open the python shell from GIMP, goto the menu of Filters >> Python-Fu >> Console

This should open the python interactive environment as seen below;-

You can now code in python via GIMP to extend its functionality or automate its processes!

Thanks for reading

Monday, April 4, 2016

Getting Started With Python Programming in QGIS

How to start python Programming in QGIS, lets write a simple "Hello world!" script.

QGIS is one of the best open source GIS software available. It has support for scripting in Python programming language. This means you can extend the functionality of QGIS using costume scripts written in python.

You don't need to install python separately, if you install QGIS it comes with its own python set by default.

From the "Plugin" menu select "Python Console" to open the Python Console interface where yo can type and run python scripts in QGIS. You can also do this by clicking on the "Python Console" icon from the tools bar.

To print a simple "Hello world!" script, use the "Interactive Console" at the bottom as follow;-

Type print "Hello world!" on the "Interactive Console" and press "Enter" key or click "Run Command" button to display the result as seen below.

This is how to start "Python Console" and run python script in QGIS.

Thanks for reading.

Map of Nigeria in SHAPEFILE format for free

Do you want to get a detailed map of Nigeria or just any country in shapefile format? Then you are reading the right article.

When you search online for a map of Nigeria, the commonest results that shows up are images/pictures of map of Nigeria. As a GIS professional you would love to get a map in shapefile format and within its corrected geographical context.
Today, I will show you how to download the map of Nigeria in shapefile format.

What is a shapefile? 

Before I show you where you can get maps in shapefile format, lets quickly see what a shapefile is.

A shapefile is a simple, non-topological format for storing the geometric location and attribute information of geographic features. Geographic features in a shapefile can be represented by points, lines, or polygons (areas). Shapefile is developed and regulated by Esri as a (mostly) open specification for data interoperability among Esri and other GIS software products. 

A shapefile isn't just a single file but it is made up of a collection of files with a common filename prefix, stored in the same directory/folder. The three mandatory files have filename extensions .shp, .shx, and .dbf. The actual shapefile relates specifically to the .shp file, but alone is incomplete for distribution as the other supporting files are required.

For example, complete Nigeria shapefile will be these files: NGA_adm0.shpNGA_adm0.shx and NGA_adm0.dbf

Downloading map of Nigeria in shapefile format

To get this map, you need to visit one of the Spatial Data providers to download it. I will recommend DIVA-GIS as I have downloaded several Free Spatial Data from there.

So head over to DIVA-GIS and select Free Spatial Data then Download country level data

Select the "Country" and the "Subject" you want and click "Ok" to start downloading your maps in shapefile.

That is all you need to do!

If you need any mapping customization feel free to contact me on 08039508010 or through my website

Thanks for reading and happy mapping.

Sunday, April 3, 2016

How to Run Python on XAMPP web server

Today, am going to talk abut "Running Python Scripts on Windows with Apache and Xampp web server".

One of the easiest ways to get Apache web server on a local windows PC is through an easy to use tool called XAMPP. Other tool that provide Apache web server on PC are WAMP or AMPPS.

While PHP and Perl are automatically installed with the XAMPP server as at the time of writing, XAMPP installation doesn't come with Python by default, hence we have to we have to add python support manually. On the other hand, the AMPPS web server includes Python if you decided to use it.

XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). It is a simple, lightweight Apache distribution that makes it extremely easy for developers to create a local web server for testing purposes.

Now download and install latest version of XAMPP if don't have it.

Next download and install Python, for this purpose am going to use Python2.7.10. Make sure you select "add python.exe to Path" to add your python set to the system PATH.

I assume you have installed both xampp and python on the C Drive:
c:/python27 or c:/python35

In order to deliver dynamic contents on the web using python with the XAMPP server, we need a mechanism to do this? This mechanism could be either of WSGI or CGI or FastCGI or sCGI etc.