Tuesday, December 29, 2009

PyQt and py2exe

PyQt is an excellent framework for creating GUI applications in Python. It would make sense to create an executable version of these applications that would not rely on Python being pre-installed. The py2exe tool makes this process very easy for most Python applications. However, I recently ran into the problem of an executable PyQt application not acting the same as its Python interpreted counterpart. For the record, I am using Python 2.6.4.

For example, PyQt4 comes with an example application called imageviewer.pyw. After creating an executable version of this application, any attempts to open a jpg file will fail. Opening a png file, however, will work.

The solution to this problem is described in more detail here. To summarize, PyQt uses a plugin to display jpg images. This plugin is not automatically included when using the py2exe tool. To manually include these plugins, do the following:
  1. In the py2exe created dist directory, create a subdirectory named PyQt4.
  2. Copy the plugins folder from the PyQt install location (typically C:\PythonXX\Lib\site-packages\PyQt4).
  3. Paste the plugins directory into the newly create PyQt4 subdirectory.
  4. From the PyQt4 install location, copy the qt.conf file.
  5. Paste the file into the py2exe dist directory.
  6. Edit the file so that the prefix is equal to ./PyQt4
  7. Test that the application works properly.

Monday, December 14, 2009

HTC Touch Pro2 Cradle Verizon Mod


I recently bought a cradle for my Verizon HTC Touch Pro2 from Meritline.com (see link below). From the webpage, it looked like a decent cradle at a reasonable price. However, this cradle is only compatible with the models that do not include a built-in 3.5mm headphone jack. The difference is that the versions without the headphone jack must have the USB jack in the exact middle of the phone while the other versions shift the USB jack over to allow room for the headphone jack.

Not knowing this ahead of time, I was disappointed to discover that my phone was unable to fit into the cradle. Luckily, this cradle can be easily modified in less than 30 minutes to fit the headphone jack sporting models. The only tools required are a screwdriver and a razor blade.

The following steps detail how to modify the cradle. Proceed at your own risk:
  1. Pry the four circular rubber feet off the bottom. These are adhesive and can be reapplied later if removed carefully.
  2. Remove the four screws to separate the top and bottom halves of the dock.
  3. Line up the bottom of the phone with the dock, placing the phone in the recessed area. Note the offset of the USB jack on the phone with the slot on the cradle.
  4. Using the razor, elongate the slot so that the USB connector can be moved to line up properly with the phone. The plastic is soft enough to make clean cuts by hand.
  5. The USB connector on the bottom half of the cradle is attached to a PCB that is held by a slotted support that is molded into the plastic. The bottom of the PCB was glued to the plastic. Cut away the glue with the razor.
  6. Reposition the USB connector using the newly elongated slot. Press the PCB back into the plastic supports. Blind fit everything to make certain the phone will fit into the cradle.
  7. At this point, the PCB can be glued into the cradle if desired. I did not bother since the plastic supports hold it firmly.
  8. Reassemble the rest of the cradle.
Meritline product page:
http://www.meritline.com/htc-usb-dock-cradle-syn-charger-station---p-39084.aspx

Wednesday, November 18, 2009

ioBridge

Haven't done too much research on the technology yet, but the ioBridge module seems to provide a web-based interface to any homebrew electronics. Seems to be a fairly active user community with several projects posted online. The $100 price tag on the base module isn't bad...

Check it out here: http://www.iobridge.com/

Tuesday, April 14, 2009

GFW Radio: Round 2

Rebel FM Feed: http://rebelfm.libsyn.com/rss
The Geekbox Feed: http://geekbox.libsyn.com/rss
Out of the Game Feed: http://mexicutedbyhepitacos.libsyn.com/rss

Fans of the now defunct GFW Radio podcast will be glad to know that most of the crew are back casting again. Along with other former 1-UPers, Anthony Gallegos and Ryan Scott have founded Rebel FM and the Geekbox, respectively. Jeff Green, Shawn Elliott and Robert Ashley now appear on the Out of the Game podcast. Fans of video game podcasts will find a lot to like here.

Monday, March 23, 2009

Thru-you by Kutiman

Link: http://thru-you.com/

This weekend, I listened to a collection of songs by an artist called Kutiman. What's unique about these songs is they were made by editing together soundtracks from various YouTube videos. The results are incredible; definitely worth a listen!

Sunday, March 22, 2009

Apple Castle

After hearing about it months ago from a family member, I finally made a point to stop by the Apple Castle in Newcastle, PA this weekend. Great store! They offer a wide variety of locally-produced specialty food ideas like apple butter, honey, candies, cheese and even meat (I think). Prices were very reasonable; surprisingly so, even. Definately worth a stop if you are in the area!

Dan Carlin's Hardcore History

Feed: http://www.dancarlin.com/dchh.xml

Hardcore History is an excellent podcast hosted by Dan Carlin. He covers a variety of topics with a very unique perspective, sparing the listener from boring details and instead focuses on the people involved. I highly recommend the show on Winston Churchill.

Unfortunately, older shows are not available for download; however, they can be purchased on CD and DVD.

New shows are released about once a month.