import bpy
import addon_utils
# Set Addon Tab
bpy.context.user_preferences.active_section = 'ADDONS'
# Set Filter
bpy.context.window_manager.addon_search = "Addon Name"
# Get a module reference by name
mod = addon_utils.addons_fake_modules.get("filename")
# If found, expand it
if mod is not None: mod.bl_info['show_expanded'] = True
# Call window
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')