The following is a proposed patch for uno.py (based on OO 3.0).  I ran into
the problem that an __import__ call will fail after running import uno, if
that __import__ call uses keyword arguments.  On closer inspection, the
_uno_import method seemed to not accept any keyword arguments.  I simply
added a **kwargs argument where appropriate when _uno_import dispatches
standard __import__ calls.  See below:

The result of running

  sudo diff uno.py uno.py.orig

is

256c256
< def _uno_import( name, *optargs, **kwargs ):
---
> def _uno_import( name, *optargs ):
260c260
<            return _g_delegatee( name, **kwargs )
---
>            return _g_delegatee( name )
262c262
<         return _g_delegatee( name, *optargs, **kwargs )
---
>         return _g_delegatee( name, *optargs )


This allowed me to call __import__ elsewhere in my python app without any
problems.  I'm curious to find out if this will be included in future
releases.  Also, please let me know if you want more information or would
prefer it in a different format.

Cheers,
Jason

Reply via email to