Exemplo n.º 1
0
 def from_file(cls, filepath, **kwargs):
     try: # jython
         from com.healthmarketscience.jackcess import Database
         from java.io import File
     except ImportError: # JPype
         from jpype import startJVM, getDefaultJVMPath, JPackage, java
         startJVM(getDefaultJVMPath())
         com = JPackage('com')
         Database = com.healthmarketscience.jackcess.Database
         File = java.io.File
     return cls(Database.open(File(filepath), True), # True = read-only
                **kwargs)