Archive for June, 2010

First Python Program

I have been off and on trying to learn Python for a few months now and yesterday I successfully finished my first real application. Unfortunately it was for work and I cannot post the source code for you all to tear a part. But it was an application displayed a menu that allowed the user to choose and made several Oracle database calls using the module cx_Oracle to test some functionality of my companies application.

There was that vague enough?

To make it useful I had to use the py2exe application to make it into a Windows executable. I had to step down my version of Python from 2.6 to 2.4 to get the py2exe compiled python application to work due to the version of C++ that Python 2.4 and 2.6 are compiled with.

I hope to start making some useful applications in the near future where I can post the source code and you all comment on and tear apart.

Review: KDE 4.5 beta on my Asus netbook

I have an Asus 1005ha netbook running Ubuntu 10.04 and last night I decided to install the lasted beta version of KDE 4.5 from the Kubnutu Experimental PPA on it.  The upgrade was very smooth but then again apt-get installs rarely fails or cause headaches.

Here  are the issues that I have come across.

1) KDM will show the login screen but will not login to either KDE or Gnome.  When you do login you are just presented with a terminal, thats it.  Kinda reminded me of the old days.  I haven’t really looked in to this issue because I just when back to using GDM instead.  I will have to tackle this here in the coming nights.

2) The process called virtuoso-t consumes way to much processor.  Some where in the neighborhood of 50-80%.  Whats worse is that after some Google searches it seems that this is a carry over issue from 4.4x series.  I really hope this gets fixed.  I was able to kill that process and then the processor drop to consuming a normal 3% or less.

3) Tweetdeck.  Yes I realize that this is not a KDE issue, but for some reason when I opened Tweetdeck there is an extra small blank windows that opens in the top left corner.  This windows also takes a place in the task bar, which might not seem like a big deal except that I am running a netbook and screen real estate is expensive.  I am still looking in to this.  Also Tweetdeck consumes way more CPU with KDE than Gnome so for the time being I switched to Gwibber to tweet with.

4) I love the transparent start menu and systray pop-ups but if you have a white window open behind them they are almost impossible to read.  This is an easy fix with them changes or modifications.

As for KDE itself.  I think after 5 revisions of the KDE 4 series I am finally drawn back to KDE.  Thank goodness because I felt like such a trader after using KDE since 1.0.  The desktop effects are awesome and very smooth even on my netbook.  I don’t want to say who is copying who but I have been using Windows 7 at work and some of the KDE effects are very similar to it.  For example being able to drag the window to the side of the screen to tile or maximize it or as you hover your mouse over the application title along the task bar it pops up a small window displaying that application.  But KDE has added many other windows effects goodies that blow Windows’ Win-Tab effect away.

There are many other little fixes and goodies stashed throughout this release.  I highly recommend this version of KDE once it is released in a few weeks and hopefully it will not disappoint you and will draw you back to the KDE project.

View Oracle dbms_output with Python

After doing lots of searching on the Internet for how to get the dbms_output from an Oracle SQL query with Python I finally found something.

import cx_Oracle
 
conn = cx_Oracle.Connection("userid/password@tns")
curs = conn.cursor()
curs.callproc("dbms_output.enable")
 
sqlCode = """
some long
sql code 
with dbms_output
"""
 
curs.execute(sqlCode)
 
statusVar = curs.var(cx_Oracle.NUMBER)
lineVar = curs.var(cx_Oracle.STRING)
while True:
  curs.callproc("dbms_output.get_line", (lineVar, statusVar))
  if statusVar.getvalue() != 0:
    break
  print lineVar.getvalue()

Yesterday’s Delivery

They finally arrived, my pair of Raleigh Phish tickets; 4th row, center!  Now I just need to find someone to go with me.

WordPress Upgrade

Last night I upgraded this blogs WordPress version to 3.0.  I have to say that it was the easiest and fasted software upgrade that I have do in a long time.  Kudos WordPress!!

I couldn’t agree more.