def openWiki (path, readonly=False): wikiroot = None Application.onStartTreeUpdate(None) def threadFunc (path, readonly): try: return WikiDocument.load (path, readonly) except IOError, error: return error except outwiker.core.exceptions.RootFormatError, error: return error