Archive for February, 2007
Headed to PyCon 2007 and My Twisted BoF Announcement
Since there seems to be virtually nothing Twisted or Nevow related going on at PyCon, I thought (last minute I know) that I would at least try to organize a BoF meeting (most likely pretty informal) for folks into Twisted and Nevow. So if you are interested, please add your name to the wiki page for the Twisted BoF. If there’s at least 3 or 4 folks, I’ll try to setup a time, even if it’s a dinner or lunch or something. Or if someone else wants to suggest a time that would be great as well.
Technorati Tags: pycon2007, python, twisted, nevow
Brandon’s Handy Komodo Hacks
If you’re running or thinking of running Komodo Edit 4.0 (or IDE), then you need to check out Brandon’s Site. In particular he’s done several different tips including:
- Find References (using Bicycle Repair Man — BRM)
- Extract Method (another BRM-related macro)
- Rename Occurrences (more BRM fun)
- Integrating Pylint
- Improving Python Help in Windows
- Explore Project Directory
Enjoy!
Technorati Tags: komodo, python
Running OpenSUSE 10.2 as a VMWare Guest
I downloaded the 10.2 version (DVD image) of OpenSUSE just to see what it was like. I quickly created a blank 20GB virtual machine for it to install into. And then it all came to a halt. After a ton of searching, I discovered that the secret was to type “nomce” as the lone boot option before selecting “Install” from the menu. Once I did that, it installed without any problems.
As for OpenSUSE itself. It was interesting seeing such a different take on an install process compared to Ubuntu (now that I have done so many installs). I have only played with it for a few minutes but I found it interesting that Python 2.5 was the default version installed. I also couldn’t immediately figure out how you’re supposed to install something like wxpython on there. I’m thinking Ubuntu has me pretty spoiled. But I still think it’s appropriate to give OpenSUSE a look.
pyodbc and mxODBC and Accessing the DB/400 AS/400 DB2 Databases
For a utility we are writing at work we needed to be able to insert and delete records from a temporary flat file/table on our AS/400. For reference, we are connecting via IBM’s iSeries Access ODBC drivers. The SELECT statements were working fine but we were getting the infamous SQL7008 errors on all DELETE and INSERT statements. I hunted frantically for a solution and everything of course explains that unjournaled files on an AS/400 won’t support transactions and that the driver should be set to an isolation level of 0. The problem is that there appears to be no way to actually set something called an “isolation level” within the IBM driver.
After some experimentation and a little logic, I discovered that the solution is rather simple. In mxODBC you need to specify the clear_auto_commit=0 as part of the connection parameters. And the solution for pyodbc is similar, you need to specify the new autocommit=True as a named parameter for the connect method. The tricky part about the pyodbc is that the new autocommit parameter didn’t exist until February 1st, 2007 (version 2.0.33). I was floundering along in version 2.0.30 and was stuck as to why the documentation didn’t seem to match the actual library. After a quick download and install of the latest version, I was in business. It’s nice to see the pyodbc project maturing and being so actively developed.
Technorati Tags: python, pyodbc, mxodbc, AS/400, DB/400, DB2