Cross-Platform


I finished up another Episode of Python 101. This one is about Python’s comprehension constructs. In this video, I cover list, dict and set comprehensions. I hope you enjoy it:

You can support my Python 101 video project via my IndieGogo crowdfunding campaign, which is ending this week.

I recorded the next episode of my Python 101 screencast today. You can support my crowdfunding campaign here.

The video is about Python’s looping structures. You will also learn how to use the else construct with a loop. Here’s the video:

I recently took on a project where I needed to graph some data on a webpage using data I had queried from a database. Since I love Python, I decided to use it to accomplish this task. I went with Flask for serving the webpage and pygal for creating the graphs. In this tutorial, I will show you how to do that too, but without the database logic. Instead, we’ll get weather data from the Weather Underground and graph that. Let’s get started!

(more…)

mousecovertitlejpg_sm_title

My latest project is turning my book, Python 101, into a Screencast. I have started a Kickstarter to raise funds to help in this endeavor. You can check it out here:

https://www.kickstarter.com/projects/34257246/the-python-101-screencast

The basic idea is to take each chapter of the book and turn it into a screencast. There are 44 chapters currently that will be turned into mini-videos. I’ve already realized I can add a lot of other items in a screencast that are easier to show than to write about, so there will definitely be additional content. I hope you will join me in this project.

Thanks,
Mike

I am currently working on another Kickstarter campaign to turn my book, Python 101 into a video series. I am planning on launching this project on Wednesday, March 25th. There are 44 chapters in my book, so I’ll be creating a minimum of 44 screencast videos. Here is what is currently covered in the book and what will also be covered in the video series:

(more…)

I see this come up from time to time where people will ask how to center a widget in a window. The solution is actually quite easy. In most cases, you just need to nest a Horizontal BoxSizer inside of a Verticel BoxSizer with some spacers. In this article, I’ll show you two three different ways to accomplish this task.

wx_centered

(more…)

I recently came across a fun little project called EasyGUI_Qt. It’s basically the same thing as EasyGUI except that it uses PyQt4 instead of Tkinter. The idea behind both of these packages is to allow the developer to ask the user simple questions using dialogs.

In this article, we’ll spend some time learning how to use this package by looking at a few examples. Note that EasyGUI_Qt works with both Python 2 and 3, although its primary target is Python 3. The documentation states that there may be some issues with unicode in Python 2, but other than that, the widgets should work fine.

(more…)

The wxPython library comes with a pair of handy methods called Freeze() and Thaw(). The call to Freeze() prevents the window from updating while it is frozen. This can be useful when you are adding or removing widgets and you want to reduce your UI from appearing to flicker. After you finish updating the UI, then you call the Thaw() method so that the user will be able to see the update.

Let’s take a look at a simple example.

(more…)

I don’t do a lot of plotting in my job, but I recently heard about a website called Plotly that provides a plotting service for anyone’s data. They even have a plotly package for Python (among others)! So in this article we will be learning how to plot with their package. Let’s have some fun making graphs!

(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…)

« Previous PageNext Page »