14 Cool and Fun Things to Do with Python

If you work in the programming industry, chances are you have already heard of Python, but what can you do with Python?

First of All, Why Is Python So Popular?

Initially launched in 1991, Python is a popular programming language these days mostly because it’s easy to learn, light and has a clean and simple syntax.

As of February 2020, it is topped only by Java and C, as the industry’s most popular programming language.

What Can You Do While Coding in Python?

There aren’t many programming languages out there that allow you to use it for every coding task you can think of, and Python is one of them but, that being said, it is better suited to specific tasks.
Python For Web Programming

1. Web Development

One of the fields Python excels in is web development, and more specifically, it can be used as a scripting language for web apps. This is how I had my first contact with Python, and I was simply amazed by it.

Testaments to Python’s web capabilities are the numerous web frameworks that were built around it, like:

From automation to scripting, anything you want to accomplish on the web can be done using Python.

2. Graphical User Interfaces

This is a less known feature of Python. Due to the numerous libraries created by the massive community around it, the programming language can be used to develop Desktop GUI (graphical user interfaces) for the most popular operating systems out there, including:

  • Windows;
  • Linux;

To accomplish this without wasting years of your life, you can use existing libraries, like PySimpleGUI and PyQt5.

3.Command-line Applications

Python is indeed a jack of all trades from a flashy GUI to a simple-looking but handy command-line application. Command-line applications are often overlooked when showcasing a programming language, but every serious programmer out there has worked on a few during his or her coding years.

Useful frameworks when building command-line applications are:

  • Docopt;
  • Argparse;

4. Scripting

I have talked before about Python’s scripting capabilities and the fact it’s light and can be adapted to any field available in the world of programming, which means it can be easily integrated into various existing systems.

Python has been embedded in all applications from FEA (finite element analysis) software like Abaqus to 3D animation and modeling programs or 2D imaging solutions like GIMP, Inkscape, and Paint Shop Pro as a scripting language.

Here are some well-known 3D packages that use Python for its scripting capabilities:

  • 3D StudioMax;
  • Blender;
  • Cinema 4D;
  • Lightwave;
  • Houdini;
  • Maya;
  • Autodesk Softimage.

How do Web Crawlers Work?

5. Web Spiders and Web Crawlers

Most people think about viruses and hackers when they hear about web spiders or web crawlers, but they are used by many reputable companies like Google or Microsoft.

The web spiders Google uses, for instance, to gather data from articles and web pages around the internet and feed that data to the databases of the “mother ship”. The search engine that made Google what they are today returns the most relevant results each time you search something online.

There are many web spiders online that gather data from users or websites for various reasons, and Python powers many of them. I’ve also made my first web spider using Python because it seemed the natural choice as its memory consumption is second only to the C or C++ programming languages. Good data handling capabilities make it the perfect tool for this sort of job.

6. Timers

From intermediate to advanced level developers, chances are you have or will encounter timers at some point. Most programs work with time, whether just to display it, to make some calculations based on it, or even to monitor how fast your applications are running, in any case, working with timers is an essential aspect of programming.

Python, of course, enables you to tackle such projects, a job that can be enhanced and simplified at the same time with the use of several built-in functions such as time(), process_time(), and thread_time() or external libraries.
Machine Learning

7. Machine Learning

Machine learning or ML is an exciting and exciting field in programming, and a lot of people talk about it today. It initially emerged in the late 1950s and early ’60s, like many fields that paved the road for the creation of the field we now refer to as computer programming.

ML is an extremely vast area of study, and there are many applications, many aspects of the world have benefited from its development.

The use of ML systems has helped fields like agriculture, banking and economics, internet fraud, and even the sequencing of the DNA.

Python is used a lot in ML systems because it is easy to integrate into the different existing engines, and some great modules like Scikit-learn, TensorFlow, and Theano also facilitate the work in such an intimidating (at first, at least) field.

8. Data Conversion

While it is an aspect of programming that is often discarded in this age where we like to talk mostly about the more hi-tech features of the coding world (like the previous chapter did), data conversion tools are an omnipresent market.

From business and accounting programs to simple length, weight, or currency converter apps, converting and manipulating different data and data types is a basic and also a key feature of programming.

Python can complete jobs like that with ease because of the smart way it handles variables and the different data types and data structures available. Multiple libraries can help you in this task likeokfn; for instance, that’s why Python has become a popular choice for many banks and finance companies.

9. Scientific and Numeric Computing

Like data conversions, data analytics is an intricate part of programming.

Data analytics are a part of the greater field of study called scientific and numerical computing. It is the science of creating, analyzing, and executing computational algorithms to understand and solve complex mathematical problems. This process can be automated by creating and then using algorithms, and this is where Python comes into place.

Again, you have several libraries that can come into your help like SciPy for mathematics and science (hence the ‘Sci’ part in the library’s name) and Pandas.
Create an IM Client App with Python

10. Instant Messaging Client

If there is one app that defines our age, then that’s the instant messaging (IM) client app.

Everybody has heard of them, and most people have at least one installed on their phones, tablets, or PCs.

As in many cases in the world of computers, IM programs exist for a long time (since the mid-’60s) but has gained mainstream popularity with the rise of Smartphones in the 2000s. Since 2010, messaging apps like WhatsApp and Facebook Messenger have become more popular, but, still, IM apps live on.

As you may expect, several IM client apps have been made using Python, my favorite being Gajim. Released in 2004, Gajim is an instant messaging client for XMPP (extensible messaging and presence protocol), which uses the GTK open-source toolkit with its own PyGTK library.

Gajim is open-source as well, so if you plan on jumping into the world of IM or just Python, it’s a good idea to look at the project.

11. Video Editor

What you need is a video editing software if you want to do post-production editing on a digital video. Video editors are complex programs as they are generally supporting both audio and video codecs as well as rendering in high definition formats.

It’s tricky to create a good video editor, especially because the quality is vital when working with video files, and the interface needs to be easy to use. Otherwise, you’ll hate every second of the process of editing.

There are a few good video editors done in Python, but the one that caught my eye is Pitivi, an open-source non-linear video editor for the Linux platform. Initially written in C but rewritten in Python before being launched in 2004.

Its creator, Edward Hervey, promised a beautiful and intuitive user interface and clean codebase as most video editors available for Linux were challenging to use and prone to crashing.

Built on the GTK and GStreamer frameworks, the program brought what it promised. Although it suffered from some bugs and had the habit of crashing when users least expected.

The Pitivii has been improved a lot, but it still has the odd crash once in a while. That being said, it’s still an awe-inspiring project and has a really good interface. I advise anyone who wants to create its own video editor to learn from Pitivi, especially since it’s an open-source project.
Cloud Computing with Python

12. Cloud Computing

Cloud computing is a very talked-about subject these days, but I was surprised to find out that most of them knew very little about the matter in hand after discussing it with several people about it.

So, just in case, I’ll start by explaining some crucial terms surrounding this subject. Cloud computing is basically the use of data storage and computing power to deliver resources over the internet (or any network).

The word “cloud” in the title has nothing to do with the clouds we see in the sky or with satellites in outer space (like some people believe). Still, it is actually a metaphor as the entire group of networked elements that provide specific services can be thought of as an amorphous cloud. Simply, it refers to data centers that users can access over the network.

Like in many other fields from the world of programming, Python has been the tool of choice for many to deploy platforms that can facilitate cloud computing. One of those platforms is OpenStack.

Like its name may imply, OpenStack is a free and open-source cloud computing platform. It began its life in 2010 as its developers, Rackspace Hosting and NASA, wanted to create open-source software for private and public clouds. It has a modular architecture, and each component has a very catchy code name.

Each component of OpenStack completes a very distinct function, as can be seen on the list below:

  • Nova – computing;
  • Neutron – networking;
  • Cinder – block storage;
  • Swift – object storage;
  • Horizon – dashboard;
  • Trove – database;
  • Searchlight – search;

OpenStack is a very complex service and can be intimidating at first glance, but if you’re interested in cloud computing or working in this field, this is definitely a project you’ll want to check out.

13. Object-Relational Mapper

To understand what an object-relational mapper is, we must first clarify what object-relational mapping or ORM is. The basic idea behind ORM is to generate SQL queries using the object-oriented paradigm of programming languages.

There are a few ORM tools out there, and quite a few are made using Python, but one of the best and most popular is SQLObject.

SQLObject was initially released in 2002 and, as I’ve said before, is an ORM between a SQL database and Python. The reason for such mappers is that object-oriented programming languages like Python don’t work organically with relational database management systems.

SQLObject supports the most popular database management systems, and MySQL, PostgreSQL, SQLite, SQL Server, MaxDB, and Firebird are all included in the distribution.

Entirely written in Python, SQLObject is an impressive ORM tool, so much so that it was integrated into another Python powered system: the TurboGears model-view-controller (MVC) framework. This is just one of the examples that show how modifiable and easy to integrate into other systems, Python projects are.
Python-scripted video games - Civilization IV

14. VideoGames

Many well-known programmers first learned to code while trying to modify or develop videogames. The fact is, videogames got most programmers into the amazing world of coding, although many of them switched to other programming fields later in life.

Now, videogames can be fun to play but don’t let that fool you, making a videogame is not a picnic. The fact is that modern videogames for desktop computers and gaming consoles require a lot of knowledge in the most important programming fields.

All those big gaming companies hire armies of specialists for nothing. Depending on the game’s genre, you’ll have to learn and get familiarized with various programming fields like physics simulations, audio and video coding, AI (artificial intelligence) and path finding, and, of course, advanced computer graphics and animations. Combine all of that, and you’ve created a videogame from scratch.

Python, a fast and object-oriented programming language with a numerous community behind it, has naturally been a popular choice among videogame creators. Both independent and big companies have used it to power their engines and games.

Here are a few well-known games built using Python language:

  • Civilization IV;
  • Battlefield II;
  • Sims 4;
  • World of Tanks;
  • EVE Online;

Just like any powerful programming language out there, the only limit Python has, is in your mind, so go and create any program, application or tool you can think of an be amazed at how fast and clean coding with Python can be.

Save THIS PIN to your Programming board to come back later!

Pinterest - Cool Things You Can Do With Python

Leave a Comment