Occasionally you will need to know what version of software you are using. The normal way to find this information out is usually done by opening the program, going to its Help menu and clicking the About menu item. But this is a Python blog and we want to do it programmatically! To do that on a Windows machine, we need PyWin32. In this article, we’ll look at two different methods of getting the version number of an application.

(more…)

Back in my system administrator days, we were thinking about setting the user’s Window desktop background to a specific image on login. Since I was in charge of the login scripts, which were written in Python, I decided to do some research to find out if there was a way to do it. We will look at two different approaches to this task in this article. The code in this article was tested using Python 2.7.8 and PyWin32 219 on Windows 7.

(more…)

I was looking through some of my old code and noticed this old script where I was creating a log of all running processes every 5 minutes. I believe I originally wrote the code to help me diagnose rogue processes that were eating memory or pegging the CPU. I was using the psutil project to get the information I needed, so if you’d like to follow along you will need to download and install it as well.

(more…)

I recently saw someone asking how to bring a window to the front in Windows and I realized I had had some old unreleased code that might help someone with this task. A long time ago, Tim Golden (and possibly some other fellows on the PyWin32 mailing list) showed me how to make windows come to the front on Windows XP, although it should be noted that it also works on Windows 7. If you’d like to follow along, you will need to download and install your own copy of PyWin32.

(more…)

This week we have Facundo Batista (@facundobatista) joining us.

facundobatista

He is a Python Core developer from Argentina. If you happen to speak Spanish, then you might enjoy his blog. Let’s spend some time getting to know Facundo! (more…)

The PyDev of the Week this week is Ben Rousch (@brousch). He is a contributor to the Kivy project. You should check out his blog here. You can also see Mr. Rousch give a talk about Kivy on Youtube. Let’s find out more about him! (more…)

There are several 3rd party packages that wrap Twitter’s API. We’ll be looking at tweepy and twitter. The tweepy documentation is a bit more extensive than twitter’s, but I felt that the twitter package had more concrete examples. Let’s spend some time going over how to use these packages! (more…)

I’ve been hearing some buzz about a newish web service called Twilio which allows you to send SMS and MMS messages among other things. There’s a handy Python wrapper to their REST API as well. If you sign up with Twilio, they will give you a trial account without even requiring you to provide a credit card, which I appreciated. You will receive a Twilio number that you can use for sending out your messages. Since you are using a trail account, you do have to authorize any phone numbers you want to send messages to before you can actually send a message. Let’s spend some time learning how this works!

(more…)

My first book, Python 101 is on sale this month. You can get it on Amazon US for $2.99 or you can buy it for 50% off via my website. To get 50% off, just enter the following offer code at checkout: fall2014

Recently I wrote about the arrow project and one of my readers mentioned that another datetime related project known as Delorean. So in this article, we’ll spend some time going over the delorean project. This will be a high level article as there is no reason to rewrite the delorean’s documentation. (more…)

« Previous PageNext Page »

Google+