How to import a .mhx file into blender using a python script
Download the make human blender tools from the make human website.
Open the zip. It will create a "blendertools" folder where you opened it.
Install the make human scene importer script:
blendertools\mhx_importer\import_scene_mhx.py
Once the plugin is installed, this command will become available to you via python:

bpy.ops.import_scene.makehuman_mhx(filter_glob="*.mhx", filepath="", scale=1, advanced=False, enforce=True, mesh=True, proxy=True, cage=False, clothes=True, shapekeys=True, drivers=False, diamond=False, rigify=True)