Hiding My (Python) Text-Strings

I’m having a little trouble using the VFSImporter, and would appreciate some help, please. I’m not at all sure that I’m using it correctly, and what I’m doing doesn’t seem to be working. I’ve tried myriad combinations of paths, to no avail thus far.

Here’s what I have thus far:

My text-strings are stored in various files within a directory-structure, all contained in a directory named for its language. Something like this:

eng/
 |
 |__ Misc.py
 |__ level1.py
 |__ etc...
 |__Cutscenes/
 |   |
 |   |__ intro.py
 |   |__ etc...
 |
 etc...

I’ve now applied the “multify” command to that language-folder, resulting in a multifile by the same name (e.g. “eng.mf”). Judging by the output, it includes the language-name directory (e.g. “eng/”) in its storage, so all file-paths within it presumably start with that directory.

Then, in my code I do the following:

# In my imports:
from panda3d.core import VirtualFileSystem
# ...
from direct.showbase import VFSImporter
VFSImporter.register()

# Elsewhere...
vfs.mount(Filename(Common.LANGUAGE_DIRECTORY + "/" + language + ".mf"),
          "./mf",
          VirtualFileSystem.MFReadOnly)
sys.path.append("./mf")

# And elsewhere still...

# The "module" variable has the name of the Python-module
#  to be imported.
# For example, if we were importing "Misc.py" above,
#  it would contain "Misc".
importer = VFSImporter.VFSImporter(Filename("%s/%s.mf/%s" % (Common.LANGUAGE_DIRECTORY, Common.language, Common.language)))
loader = importer.find_module(module)
result = loader.load_module(module)

Alas, the result of “find_module” seems to consistently be “None”, regardless of the variations in the above that I’ve tried. :/

A print-out of “vfs.getMounts()” includes the value “Languages/eng.mf”, and as noted above the multifile seems to contain the “eng” directory, hence the Filename given to the VFSImporter constructor.

The use of “register” above is based on this post. The last section of code above is based on the code found in “AppRunner.py”.

When I was using Python-importation, I instead used the following line:

result = __import__("%s.%s.%s" % (Common.LANGUAGE_DIRECTORY, Common.language, entry), fromlist = module)

(The “entry” variable in this case holds the same string as the “module” variable, I believe.)

Based on a look at the “register” function, I had thought that perhaps this was enough, that such importations were redirected through VFSImporter–but that doesn’t seem to be the case for “__import__”, unless I’m missing something. I did try just “import” (instead of “__import__”), but that produced a syntax-error; being less familiar with that version of dynamic importation, I may well have been misusing it.

So… where am I going wrong? :/