diff --git a/neqsim/__init__.py b/neqsim/__init__.py index f25d5b6..a6fae74 100644 --- a/neqsim/__init__.py +++ b/neqsim/__init__.py @@ -4,7 +4,7 @@ It uses the Jpype module for bridging python and Java. """ -from .neqsimpython import * +from neqsim.neqsimpython import jNeqSim, jpype def methods(checkClass): methods = checkClass.getClass().getMethods() @@ -23,7 +23,6 @@ def has_tabulate(): def setDatabase(connectionString): - from neqsim.neqsimpython import jNeqSim jNeqSim.util.database.NeqSimDataBase.setConnectionString(connectionString) jNeqSim.util.database.NeqSimDataBase.setCreateTemporaryTables(True) @@ -31,14 +30,13 @@ def save_xml(javaobject, filename): xstream = jpype.JPackage('com.thoughtworks.xstream') streamer = xstream.XStream() xml = streamer.toXML(javaobject) - print(xml, file=open(filename, 'w')) + print(xml, file=open(filename, 'w')) return xml def open_xml(filename): xstream = jpype.JPackage('com.thoughtworks.xstream') - security = jpype.JPackage('com.thoughtworks.xstream.security') streamer = xstream.XStream() - streamer.addPermission(security.AnyTypePermission.ANY) + streamer.addPermission(xstream.security.AnyTypePermission.ANY) str = open(filename, 'r').read() neqsimobj = streamer.fromXML(str) return neqsimobj