Show
Ignore:
Timestamp:
01/18/08 23:39:41 (16 years ago)
Author:
jerome
Message:

Added modules to store utility functions and application
intialization code, which has nothing to do in classes.
Modified tool.py accordingly (far from being finished)
Use these new modules where necessary.
Now converts all command line arguments to unicode before
beginning to work. Added a proper logging method for already
encoded query strings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykosd

    r3288 r3294  
    3030    import pyosd 
    3131except ImportError :     
    32     sys.stderr.write("Sorry ! You need both xosd and the Python OSD library (pyosd) for this software to work.\n") 
     32    logerr("Sorry ! You need both xosd and the Python OSD library (pyosd) for this software to work.\n") 
    3333    sys.exit(-1) 
     34 
     35import pykota.appinit 
     36from pykota.utils import * 
    3437 
    3538from pykota.errors import PyKotaToolError, PyKotaCommandLineError 
     
    192195        retcode = 0 
    193196    except KeyboardInterrupt :         
    194         sys.stderr.write("\nInterrupted with Ctrl+C !\n") 
     197        logerr("\nInterrupted with Ctrl+C !\n") 
    195198        retcode = -3 
    196199    except PyKotaCommandLineError, msg :     
    197         sys.stderr.write("%s : %s\n" % (sys.argv[0], msg)) 
     200        logerr("%s : %s\n" % (sys.argv[0], msg)) 
    198201        retcode = -2 
    199202    except SystemExit :