Ten Ten Ways to Make a Living with Python - The Part of Tens - Beginning Programming with Python For Dummies (2014)

Beginning Programming with Python For Dummies (2014)

Part V

The Part of Tens

Chapter 18

Ten Ways to Make a Living

with Py thon

In This Chapter

▶ Using Python for QA

▶ Creating your own way in a smaller organization

▶ Employing Python for special product-scripting needs

▶ Working as an administrator

▶ Demonstrating programming techniques

▶ Delving into location data

▶ Mining data of various sorts

▶ Working with embedded systems

▶ Processing scientific data

▶ Analyzing data in real time

Y ou can literally write any application you want using any language you desire given enough time, patience, and effort. However, some under-takings would be so convoluted and time consuming as to make the effort

a study in frustration. In short, most (possibly all) things are possible, but not everything is worth the effort. Using the right tool for the job is always a plus in a world that views time as something in short supply and not to be squandered.

340 Part V: The Part of Tens

Python excels at certain kinds of tasks, which means that it also lends itself to certain types of programming. The kind of programming you can perform

determines the job you get and the way in which you make your living. For example, Python probably isn’t a very good choice for writing device driv-ers, as C/C++ are, so you probably won’t find yourself working for a hardware company. Likewise, Python can work with databases, but not at the same

depth that comes natively to other languages such as Structured Query

Language (SQL), so you won’t find yourself working on a huge corporate database project. However, you may find yourself using Python in academic settings because Python does make a great learning language. (See my blog post on the topic at http://blog.johnmuellerbooks.com/2014/07/14/


The following sections describe some of the occupations that do use Python regularly so that you know what sorts of things you might do with your

new-found knowledge. Of course, a single source can’t list every kind of job.

Consider this an overview of some of the more common uses for Python.

Working in QA

A lot of organizations have separate Quality Assurance (QA) departments

that check applications to ensure that they work as advertised. Many different test script languages are on the market, but Python makes an excellent language in this regard because it’s so incredibly flexible. In addition, you can use this single language in multiple environments — both on the client and on the server. The broad reach of Python means that you can learn a single language and use it for testing anywhere you need to test something, and in any environment.

In this scenario, the developer usually knows another language, such as C++, and uses Python to test the applications written in C++. However, the QA

person doesn’t need to know another language in all cases. In some situations, blind testing may be used to confirm that an application behaves in a practical manner or as a means for checking the functionality of an external service provider. You need to check with the organization you want to work with as to the qualifications required for a job from a language perspective.

Chapter 18: Ten Ways to Make a Living with Python 341

Why you need to know multiple

programming languages

Most organizations see knowledge of multiple multiple languages tends to reduce frustration.

programming languages as a big plus (some Most large applications today rely on composee it as a requirement). Of course, when you’re nents written in a number of computer lanan employer, it’s nice to get the best deal you guages. In order to understand the application can when hiring a new employee. Knowing a and how it functions better, you need to know broader range of languages means that you every language used to construct it.

can work in more positions and offer greater

value to an organization. Rewriting applica

Knowing multiple languages also makes it

tions in another language is time consuming, possible to learn new languages faster. After error prone, and expensive, so most companies a while, you start to see patterns in how comlook for people who can support an application puter languages are put together, so you spend in the existing language, rather than rebuild it less time with the basics and can move right from scratch.

on to advanced topics. The faster you can learn

new technologies, the greater your opportuni

From your perspective, knowing more lanties to work in exciting areas of computer sciguages means that you’ll get more interesting ence. In short, knowing more languages opens jobs and will be less likely to get bored doing the a lot of doors.

same old thing every day. In addition, knowing

Becoming the IT Staff for

a Smaller Organization

A smaller organization may have only one or two IT staff, which means that you have to perform a broad range of tasks quickly and efficiently. With

Python, you can write utilities and in-house applications quite swiftly. Even though Python might not answer the needs of a large organization because

it’s interpreted (and potentially open to theft or fiddling by unskilled employees), using it in a smaller organization makes sense because you have greater access control and need to make changes fast. In addition, the ability to use Python in a significant number of environments reduces the need to use anything but Python to meet your needs.

342 Part V: The Part of Tens

Some developers are unaware that Python is available in some non-obvious

products. For example, even though you can’t use Python scripting with

Internet Information Server ( IIS) right out of the box, you can add Python scripting support to this product using the steps found in the Microsoft

Knowledge Base article at http://support.microsoft.com/kb/276494.

If you aren’t sure whether a particular application can use Python for scripting, make sure that you check it out online.

Performing Specialty Scripting

for Applications

A number of products can use Python for scripting purposes. For example, Maya (http://www.autodesk.com/products/autodesk-maya/overview)

relies on Python for scripting purposes. By knowing which high-end products support Python, you can find a job working with that application in any business that uses it. Here are some examples of products that rely on Python for scripting needs:

✓ 3ds Max

✓ Abaqus

✓ Blender

✓ Cinema 4D


✓ Google App Engine

✓ Houdini

✓ Inkscape

✓ Lightwave

✓ Modo

✓ MotionBuilder

✓ Nuke

✓ Paint Shop Pro

✓ Scribus

✓ Softimage

Chapter 18: Ten Ways to Make a Living with Python 343

This is just the tip of the iceberg. You can also use Python with the GNU

debugger to create more understandable output of complex structures, such as those found in C++ containers. Some video games also rely on Python as a scripting language. In short, you could build a career around creating application scripts using Python as the programming language.

Administering a Network

More than a few administrators use Python to perform tasks such as monitoring network health or creating utilities that automate tasks. Administrators are often short of time, so anything they can do to automate tasks is a plus.

In fact, some network management software, such as Trigger (http://

trigger.readthedocs.org/en/latest/), is actually written in Python.

A lot of these tools are open source and free to download, so you can try them on your network. Also, some interesting articles discuss using Python for network administration, such as “Intro to Python & Automation for Network Engineers” at http://packetpushers.net/show-176-intro-to-python-automation-for-network-engineers/. The point is that

knowing how to use Python on your network can ultimately decrease your

workload and help you perform your tasks more easily. If you want to see

some scripts that are written with network management in mind, check out

25 projects tagged “Network Management” at http://freecode.com/


Teaching Programming Skills

Many teachers are looking for a faster, more consistent method of teaching computer technology. Raspberry Pi (http://www.raspberrypi.org/)

is a single-board computer that makes obtaining the required equipment a

lot less expensive for schools. The smallish device plugs into a television or computer monitor to provide full computing capabilities with an incredibly simple setup. Interestingly enough, Python plays a big role into making the Raspberry Pi into a teaching platform for programming skills (http://www.


In reality, teachers often use Python to extend native Raspberry Pi capa-

bilities so that it can perform all sorts of interesting tasks (http://www.

raspberrypi.org/tag/python/). The project entitled, Boris, the Twitter

Dino-Bot (http://www.raspberrypi.org/boris-the-twitter-dino-

bot/), is especially interesting. The point is that if you have a teaching goal in mind, combining Raspberry Pi with Python is a fantastic idea.

Performing Real-Time Analysis of Data

Making decisions requires timely, reliable, and accurate data. Often, this data must come from a wide variety of sources, which then require a certain amount of analysis before becoming useful. A number of the people who

report using Python do so in a management capacity. They use Python to

probe those disparate sources of information, perform the required analysis, and then present the big picture to the manager who has asked for the information. Given that this task occurs regularly, trying to do it manually every time would be time consuming. In fact, it would simply be a waste of time. By the time the manager performed the required work, the need to make a decision might already have passed. Python makes it possible to perform tasks quickly enough for a decision to have maximum impact.

Previous sections have pointed out Python’s data-mining, number-crunching, and graphics capabilities. A manager can combine all these qualities while using a language that isn’t nearly as complex to learn as C++. In addition, any changes are easy to make, and the manager doesn’t need to worry about learning programming skills such as compiling the application. A few changes to a line of code in an interpreted module usually serve to complete the task.

As with other sorts of occupational leads in this chapter, thinking outside the box is important when getting a job. A lot of people need real-time analysis.

Launching a rocket into space, controlling product flow, ensuring that packages get delivered on time, and all sorts of other occupations rely on timely, reliable, and accurate data. You might be able to create your own new job simply by employing Python to perform real-time data analysis.