Ignore:
Timestamp:
03/19/10 15:52:20 (2 years ago)
Author:
dart
Message:

LoPlug?:
o Fix init
o Work on plugin package for pyinstaller

Note:
Does not take care pyhook error at startup, module is correctly loaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loplug/plugins/input/pginput.py

    r1791 r1876  
    1818 
    1919import pythoncom 
    20 import pyHook 
     20import sys 
     21try: 
     22    import pyHook 
     23except: 
     24    import traceback 
     25    exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() 
     26    msg_a = traceback.format_exception(exceptionType, exceptionValue, exceptionTraceback) 
     27    msg = "" 
     28    for m in msg_a: 
     29        msg += m 
     30    print "pyHook cannot be loaded\n", msg 
     31try: 
     32    import PyHook as pyHook 
     33except: 
     34    import traceback 
     35    exceptionType, exceptionValue, exceptionTraceback = sys.exc_info() 
     36    msg_a = traceback.format_exception(exceptionType, exceptionValue, exceptionTraceback) 
     37    msg = "" 
     38    for m in msg_a: 
     39        msg += m 
     40    print "PyHook cannot be loaded\n", msg 
    2141import ctypes 
    2242import win32com.client  
Note: See TracChangeset for help on using the changeset viewer.