Author Archive


How to Create Canvas Animation Using Tkinter

Tkinter is one of the most popular GUI toolkits available for python. It is available as part of the standard python installation. Hence you can use this package without installing any additional modules. Tkinter is a powerful GUI library and you can use it to build full fledged user interfaces or build simple desktop games. […]

How to Download Multiple Files Concurrently in Python

Python has a very powerful library called requests for initiating http requests programmatically. You can use requests for downloading files hosted over http protocol. Run the following command to install requests python library. This assumes that you already have python 3 installed on your system. pip3 install requests You may need to prefix the above […]

How to Run Like Queries in MongoDB

When working with textual data in mongodb, you may want to fetch documents with partial match on a field. You can use the $regex operator in mongodb for running like queries. By default, the like query using $regex is case sensitive. Assume that you have collection in your mongodb containing names of the countries. A […]

How to Search in XML File Using Python and Lxml Library

Python is a powerful language when it comes to quick textual analysis of XML documents. Due to its simplicity and expressive power, it is possible to write short python scripts to do analysis on XML documents. In this article I provide a number of python scripts for processing and analysing content in XML documents. I […]

How to Connect to MySQL Database and Run Queries from Python

MySQL now provides support for pure python based access to mysql database. Use the python mysql connector in your program for accessing the mysql database. Run the following command in your machine’s command prompt to install the driver (this assumes you already have python3 installed), pip3 install mysql-connector-python If you get access denied error for […]