Archive for the 'Uncategorized' Category

Python: AttributeError: ‘getopt’ module has no attribute ‘GetoptError’

Wednesday, July 28th, 2010

So I was figuring out how to parse command line arguments with python and using the getopt module with the following code


#!/usr/bin/env python
import sys
import getopt

def main(argv):
   grammar = "some.xml"
   try:
      opts,args = getopt.getopt(argv,"hg:d",["help","grammar="]
   except getopt.GetoptError:
      usage()
      sys.exit(2)

if __name__ == "__main__":
    main(sys.argv[1:]

And I was getting the following error:

AttributeError: ‘getopt’ module has no attribute ‘GetoptError’

So my first problem was that I had named my script getopts.py and after renaming the script, I got the same error. Well you now need to remove the getopts.pyc file that was generated from your earlier running of the poorly named script.

Passing JVM options to Maven

Wednesday, June 30th, 2010

If you are using maven to build your projects , then you might have found an out of memory condition in your tests.  Well, setting the MAVEN_OPTS variable with JVM specific options will help with this.

Example:

MAVEN_OPTS=-Xmx1024

Depending on what environment you are in, you will need to set this variable.

This will give the JVM more 1024 megs to work with and you can customize the number to fit your needs.

Enable 30 second skip with Comcast DVR

Wednesday, July 15th, 2009

Motorola DCT6412 (Comcast DVR) 30-second skip

I have a Tivo and missed the 30 second skip that was available and I found that the same was available with the Comcast Cable remote.

1) Press the button at the top of the remote to put it into Cable Box control mode.

2) Press and hold the button until the button blinks twice.

3) Type in the code 994. The button will blink twice.

4) Press (do not hold) the button

5) Type in the code 00173 (for 30 second Skip).

6) Press whatever button you want to map the skip, I used the help button as I have never used it myself.

Welcome to 30 second skipping.

Welcome to eTechTips

Wednesday, May 27th, 2009

Say goodbye to the bouncing ball!

As this site has been close to 10 years in the making, it is time to say goodbye to the basic flash animation that I started with on the main page.

So feel free to ask questions or give me suggestions for topics.

Welcome To eTechtips – Day One

Tuesday, May 26th, 2009

Welcome to day one of the revamped eTechtips informational blog.

Please feel free to request information about any topics that interest you.