I've got a variable that is either a Java package or a Python package.  e.g.:
 
>>> type(mod1)
<type 'javapackage'>
 
>>> type(mod2)
<type 'module'>
 
Programatically how can I determine if a variable is a Java package?
I guess I could do:
   if (str(type(mod1)) == "<type 'javapackage'>"):
but that is really dumb.  I want something like:
   if (isinstance(mod1, types.JavaPackage)):
 
Thanks,
Jeff.