def import_star_execstr(modname, parent=None):
    """
    print(ut.import_star_execstr('opengm.inference'))
    """
    from utool import util_str
    module_vars = import_star(modname, parent=parent)
    fromlist_str = ', '.join(sorted(module_vars.keys()))
    fromimport_prefix = 'from {modname} import ('.format(modname=modname)

    newline_prefix = (' ' * len(fromimport_prefix))
    if fromlist_str:
        rawstr = fromimport_prefix + fromlist_str + ',)'
    else:
        rawstr = ''
    textwidth = 79 - 4
    fromimport_str = util_str.pack_into(rawstr, textwidth=textwidth,
                                        newline_prefix=newline_prefix,
                                        break_words=False)

    # fromimport_str = ut.autopep8_format(fromimport_str, ignore={})
    return fromimport_str