Archive for January, 2011

It’s almost the end of January already and PyCon USA 2011 is just around the corner. In this edition, we cover a wide variety of topics, from Python 2.7 – 3.x. We’ve got sprints, new books, web-related projects and good old recursion articles. Come one, come all! Read the news of the week!

On the PyCon front, you should take note the Early Bird pricing is now over. Why did you wait? Fortunately, they are still selling tickets, so stop stalling and just come! The PyCon blog also mentions that they’re still looking for sponsors, so if you or someone you know has that kind of cashola, point them in that direction.

And now we return you back to your regularly scheduled blog reading…

Did you know that PyCon’s Early Bird registration is over and you missed it! Well, now you have to pay more! I recommend doing it now before they reach their registration cap because sneaking into the conference is just plain wrong. Also, airline ticket pricing tends to fluctuate more than the waves at the seaside, although unlike the waves, the prices usually just get bigger. If you’d like the bang for your buck, check out the PyCon blog page because it lists a bunch of the activities that they have planned.

On another note, PyCon is still looking for sponsors. Do you have cash buried in your back yard or under your mattress and you don’t know what to do with it all? Do you use open source software and always wondered how to support them? Well, PyCon can solve both those problems! Heck, you don’t even have to spend all your loot. Get a friend and make him pay too.

The big question that always pops up when giving away money is: what will this accomplish (i.e. what’s in it for me)? Well, check out this handy list:

  1. It keeps the conference cheap!
  2. You will get warm fuzzies
  3. You will support the Python Software Foundation which in turn supports sprints, Python projects, other Python conferences and lots of other things.
  4. You’ll get your name in the program (I think)

If you happen to own a business or know someone who does, this is a great way to advertise. Especially if you have job openings for geeks. There are several sponsorship levels to choose from. You can contact pycon-sponsors@python.org or Jesse Noller (jnoller@python.org) directly with any questions you might have.

In this article, we will be looking at wxPython’s Wizard widget. No, it has nothing to do with Dumbledore or Gandalf. Instead, it is that dialog that you’ll see when you run an installer or set up a template. Sometimes you’ll even see them used for setting up mail merge. We will cover two examples in this tutorial: one that is fairly simple and another that is slightly more complex. Let’s get started!

Note: The code in this article was adapted from the wxPython Demo application

(more…)

PyChecker is a cool tool for checking Python scripts for bugs. It works with Python 2.0 – 2.7. In this article, we will write some crappy code to see what PyChecker can pick up on. Then we’ll improve the code according to what we find until the code checks out. According to PyChecker’s website, it can detect the following problems:

  • No global found (e.g., using a module without importing it)
  • Passing the wrong number of parameters to functions/methods/constructors
  • Passing the wrong number of parameters to builtin functions & methods
  • Using format strings that don’t match arguments
  • Using class methods and attributes that don’t exist
  • Changing signature when overriding a method
  • Redefining a function/class/method in the same scope
  • Using a variable before setting it
  • self is not the first parameter defined for a method
  • Unused globals and locals (module or variable)
  • Unused function/method arguments (can ignore self)
  • No doc strings in modules, classes, functions, and methods

(more…)

PyCon is a conference that is run almost entirely by volunteers. Do you know what that means? It means that they need you! Last year, I volunteered and it was a mostly good experience. You can check out the staff list to see if there’s any responsibilities you’d like to take over. If so, be sure to join the pycon-organizers mailing list. Here is the primary Volunteer page and following is a copy of what they currently need help with onsite:

  • Registration desk volunteers
  • Swag bag stuffers
  • Session Staff (Note: we need to setup a way for session staff to volunteer for particular sessions; Stay tuned!)
  • Tutorial day help
  • Electrical cord tapers / untapers
  • Last minute helper mob

You can read about these positions here. You can read about my experiences as a session chair here. I was a little nervous when I did it, but I think it went alright.

The main thing to remember is this: If you see someone who obviously needs help, don’t just stand there like a dope! Get over there and help them out!

Last year, it was popular for bloggers to write about the five talks that they most wanted to see at PyCon. I don’t know if I’ll be going to PyCon this year, but if I did, these are my picks in no particular order.

Of course, there are more than 5 that I want to see and I’m sure that there will be plenty of them that happen at the same time, so I won’t get to see them all anyway. Alex Gaynor has a couple talks that I’d like to see and Martelli is giving another cerebral presentation. Wesley Chun has a couple talks too. I don’t see anything by Jeff Rush, which is a shame. I’ve enjoyed him in the past. Anyway, what are the talks that you want to see? Let me know in the comments!

PyCon comes but once a year and whether you’re a new Python Programmer or you’ve been a core developer for the last 20 years, I think you should check PyCon out. Take some time to load up on some PyCon info so you can give your employers the low down about why they should pay you to go or why you should invest your hard earned greenbacks in a conference that only covers one programming language! (more…)

This week, I didn’t have as much time to work on this as I would have liked. Ah well, hopefully you won’t find the quality of the news to be any less. It just so happens that PyCon 2011 had a couple of items this week and they were both good news. Be sure to check those out. Also, Python won another award,

If you’re interested in keeping up on Python news on a minute-by-minute basis, then Twitter is probably where you want to go.

Cody Precord, author of wxPython 2.8 Application Development Cookbook, recently started a thread on the wxPython-dev Google group where he described a WYSIWYG project he has been working on for creating wxPython GUIs. Originally, he programmed it as a plugin for his Editra project, but has decided to release it as a separate project.

He would like some help in continuing the development of this project. If you go to read the thread, you’ll see you can download the a screencast that shows the program in action as an avi file. I uploaded it to Youtube and embedded it below as well.

I think this project looks really cool and has lots of potential. I hope that there of many other developers out there that will jump on this project and help get it finished. It would be great to have a tool like this. You can join the conversation by joining the wxPython-dev Google Group.

I have been working on a software inventory script lately using SqlAlchemy on Windows XP to connect to a newly created table in a Microsoft SQL Server 2005 database. I created the table using Aqua Data Studio, logging in as the SQL Administrator (sa) and thought all was well until I tried to commit some data to the table. Here’s the screwy error that I received:

pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find the object "dbo.software" because it does not exist or you do not have permissions. (1088) (SQLExecDirectW)')

(more…)