The 2012 Python Conference USA opened Registration today. The official announcement doesn’t mention it, but I’m pretty sure there’s an attendance cap on this conference too of 1500 just like last year. You should sign up early not only because of the limited attendance, but because there are “Early Bird” rates which are cheaper!

The complete schedule isn’t done yet, but you can whet your appetite by checking out the list of tutorials that were released last week.

I have enjoyed all the PyCons I’ve attended so far. They are a great place to learn new things, show others your talent, network with like-minded people and just relax too. This year, the conference will be in Santa Clara, California. If you can’t afford to go, they even offer Financial Assistance. So why are you waiting?

Background
================

This is the first release of a real project that I’ve been involved in. I had written an article last month that inspired Werner Bruhin to want to take it and make it into a demonstration program for new wxPython programmers in how to do MVC and CRUD while interfacing with a database. Thus, MediaLocker was born. We hope you like it.

Description
================

A wxPython database application that can help you keep track of your media. Currently, it only tracks your Book library. You can read more about the project’s development in the following two articles:

Requirements
================

- Python 2.6+
- wxPython 2.8.11+ with the new pubsub (download here) or wxPython 2.9.3
- SQLAlchemy 0.7.3+
- ObjectListView 1.2

Configuration
================

After you have downloaded the source, run “python setup_lib.py develop” in the main folder before you try to run “mediaLocker.py”. If you are on wxPython 2.8, download the pubsub path (above) and extract it to “C:\Python27\Lib\site-packages\wx-2.9.2-msw\wx\lib” (or wherever your wxPython is installed).

Source
================

You can download the source from BitBucket: https://bitbucket.org/driscollis/medialocker

You can also just download a snapshot of the current files here (uploaded 2011.12.09 @ 1138 hrs CST):

How you can help
================

Download the software and report bugs on BitBucket. We also happily accept feature requests, especially if they include patches or code.

Note: This has only been tested on Windows XP and 7

The Linux Journal readers have good taste. This is the 3rd year that they have voted Python as the Best Programming Language. Oddly enough, C++ is the runner-up. I personally liked C++ when I was in school, but the two languages are quite different. On the other hand, Python interfaces with C/C++ pretty well, so maybe the readers of that magazine like to do mash-ups with the two languages. You will also note that they voted Python as the Best Scripting Language too.

Congrats to the Python community and the PSF too!

Hat-tip to Steve Holden who mentioned this on Python.org’s news feed.

This blog ran an article about wxPython, SQLAlchemy, CRUD and MVC earlier this month. The program that we created in that post was dubbed “MediaLocker”, whether or not it was explicitly stated as such. Anyway, since then, I have received a couple comments about improving the program. One came from Michael Bayer, one of the creative minds behind SQLAlchemy itself and the other comments came from Werner Bruhin, a nice guy who haunts the wxPython mailing list, helping new users. So I went about creating an improved version of the code following their advice. Werner then improved it a bit more. So in this article, we will be looking at improving the code, first with my example and then with his. Enough talk though; let’s get to the meat of story! (more…)

This week, I discovered a new book on Python titled Treading on Python Vol. 1 by Matt Harrison. The book is only in draft form, so it’s still pretty rough, but the author was kind enough to send me a free copy in epub and mobi formats. I read part of it using EPUBReader, an add-on to Firefox so I could read it in my browser. Then I switched to the PC Kindle software to finish the book.

The book is your typical introductory text to Python. I felt like it was a tad shorter than some of the intro books I’ve read though, but that may be because it was an eBook. He covers what you would expect, but here’s a short list of topics:

  • Installation of Python
  • The Interpreter
  • Numbers and Strings
  • dir and help (introspection, although he never uses that word)
  • comments
  • Sequences (lists, tuples and dicts)
  • Functions, Classes, and Methods
  • File I/O
  • Exceptions – very brief, doesn’t show how to make your own

He uses a few odd terms that I’ve never heard, like calling the double-underscore methods of Python “dunder methods” (like __init__ or __seq__). The only name I’ve ever heard for those are “magic methods”. He also says the following: It is common to hear in Python parlance of “truthy” or “falsey” (Kindle location 700) regarding bools and bool-like objects. I’ve read a lot of books on Python and never come across that before either. It’s no big deal, they just kind of jumped out at me and left me scratching my head.

Anyway, I can’t be too hard on it because it’s still only a draft. I did notice that some of the first sections in the book seem to get repeated later on. I’m not sure if that was intentional or not. Maybe it was a way of emphasizing the material. Regardless, the information in the book is pretty good for someone who is just coming to the language. I should mention that it’s more of an overview book though. Every topic has only 1-4 pages of information on it on average, so this book will give you enough information to get going, but you’ll still need to read the docs if you hit a wall. For example, he mentions comprehensions, but never says what they are. You don’t need those when you program, but they sure can be nice. On the other hand, he does talk about the “with” statement quite a bit.

Overall, I would say this is a pretty good introductory text on Python. The reader will get a nice overview of the language without the confusion of 3rd party packages or even very much of the included modules. They get a little introduction to Python introspection tools, which is pretty nice. When the book is finished, this is one you may want to keep in mind for your budding Pythonista. You can actually purchase the book from his website now for $4.99 and I think you get the final version when it’s done, kind of like Manning’s Early Access Program (MEAP).

Python is pretty easy to install on Windows, but sometimes you need to do a few extra tweaks to really get the most our your development environment. In this article, we will try to cover all the common things you might want to do or install to get an ideal Python Windows development workspace set up. Some of you might think that all you need to do is install Python and you’re done, but if you’re going to do Windows development, then you’ll need a few other packages to make it nicer. (more…)

Recently, I was linked to the Python Forum because one of my friends on the wxPython IRC channel said that Packt was trying to find reviewers for their new book, Numpy 1.5 Beginner’s Guide by Ivan Idris. I doubt they’re going to find many people on that website though. I’ve certainly never heard of it. Anyway, Packt was kind enough to give me a copy of it as an ebook, so I’ll be reading it over the next couple of weeks so I can review it for this website. (more…)

In this article, we will be creating a program to store our personal books or perhaps just the books you’ve read. It will demonstrate how to combine wxPython and SqlAlchemy, a SQL Object Relational Mapper (ORM). This program will also give you an introduction to the model-view-controller (MVC) and “create, read, update and destroy” (CRUD) methodologies. The aim is to show you how to create an application that can do the following:

  • Create a database (create)
  • Add records to that database (sort of create)
  • Display the records (read and view)
  • Modify records (update)
  • Delete records (destroy)

The order of this tutorial will follow MVC, so we will start with the model. The model is the basis for the GUI (the View) anyway, so it’s a good place to start. (more…)

Last night, Andrea Gavana released his new Namespace Diff Tool (NDT) to the world. I got his permission to reprint his announcement here for all those people who don’t follow the wxPython mailing list. I think it sounds like a really cool tool. You should check it out and see what you think. Here is the announcement: (more…)

One day at work last month, I was told that we had a feature request for one of my programs. They wanted a “dark mode” for when they used my application at night as the normal colors were kind of glaring. My program is used in laptops in police cars, so I could understand their frustration. I spent some time looking into the matter and got a mostly working script put together which I’m going to share with my readers. Of course, if you’re a long time reader, you probably know I’m talking about a wxPython program. I write almost all my GUIs using wxPython. Anyway, let’s get on with the story! (more…)

« Previous PageNext Page »