Archive for December, 2007

Pygments test

This is a test post to see how code highlighting looks using Pygments. The CSS styles outputted from pygmentize -f html -S default were added to the blog template, and the source code example from ASPN was highlighted with pygmentize -f html hello.py.

#!/usr/bin/env python
"""
SYNOPSIS

    TODO helloworld [-h,--help] [-v,--verbose] [--version]

DESCRIPTION

    TODO This describes how to use this script. This docstring
    will be printed by the script if there is an error or
    if the user requests help (-h or --help).

EXAMPLES

    TODO: Show some examples of how to use this script.

EXIT STATUS

    TODO: List exit codes

AUTHOR

    TODO: Name <name@example.org>

LICENSE

    This script is in the public domain, free from copyrights or restrictions.

VERSION

    $Id$
"""

import sys, os, traceback, optparse
import time
import re
#from pexpect import run, spawn

def main ():

   global options, args
   # TODO: Do something more interesting here...
   print 'Hello world!'

if __name__ == '__main__':
   try:
       start_time = time.time()
       parser = optparse.OptionParser(formatter=optparse.TitledHelpFormatter(), usage=globals()['__doc__'], version='$Id$')
       parser.add_option ('-v', '--verbose', action='store_true', default=False, help='verbose output')
       (options, args) = parser.parse_args()
       #if len(args) < 1:
       #    parser.error ('missing argument')
       if options.verbose: print time.asctime()
       main()
       if options.verbose: print time.asctime()
       if options.verbose: print 'TOTAL TIME IN MINUTES:',
       if options.verbose: print (time.time() - start_time) / 60.0
       sys.exit(0)
   except KeyboardInterrupt, e: # Ctrl-C
       raise e
   except SystemExit, e: # sys.exit()
       raise e
   except Exception, e:
       print 'ERROR, UNEXPECTED EXCEPTION'
       print str(e)
       traceback.print_exc()
       os._exit(1)
Advertisements

Petrus Blogger: GNU/Linux blog client

After looking around for a Blogger client for GNU/Linux, I’ve found Petrus Blogger. Installation instructions and initial review came through here. I recommend.

My things returned the way they had gone: without explanation

My lost belongings are back with me! I don’t have any explanation, and I don’t really care for one now. Everything is here. The airline employee told me the backpack arrived from Salvador. She didn’t know what had happened to it, and I can only guess that somebody took it by mistake.

My backpack was stolen

I’ve heard about a lot of people having their notebooks stolen from airports. I thought it would never happen to me. It actually didn’t. My backpack was stolen from an airplane’s overhead bin across to where I was sitting. A lot of personal information from emails and documents is at large. More than two months of personal projects are gone. This bothers me a lot.

Gmail: I hate the threaded email view!

Well, the title says it all. I simply hate the way Gmail groups my emails (conversations, as Gmail calls it) in threads. Probably that is why I rarely used it. And I’m not alone as can be seen here and here. I would really like threaded view as an option that can be disabled. If you also dislike it, request that conversation view can be set on or off here. I already did it.


Twitter Updates

December 2007
S M T W T F S
« Nov   Jan »
 1
2345678
9101112131415
16171819202122
23242526272829
3031