def python_header(cls):
        out = '#!/usr/bin/env python3.6\n'
        out += f'from {cls.__import_name__} import *\n\n'

        all_types = set(type(n) for n in cls.neurons())
        _subs = [inspect.getsource(c) for c in subclasses(Neuron)
                 if c in all_types and Path(inspect.getfile(c)).exists()]
        subs = '\n' + '\n\n'.join(_subs) + '\n\n' if _subs else ''
        #log.debug(str(all_types))
        #log.debug(f'python header for {cls.filename_python()}:\n{subs}')
        out += subs

        ind = '\n' + ' ' * len('config = Config(')
        _prefixes = {k:str(v) for k, v in cls.ng.namespaces.items()
                     if k not in uPREFIXES and k != 'xml' and k != 'xsd'}  # FIXME don't hardcode xml xsd
        len_thing = len(f'config = Config({cls.ng.name!r}, prefixes={{')
        '}}'
        prefixes = (f',{ind}prefixes={pformat(_prefixes, 0)}'.replace('\n', '\n' + ' ' * len_thing)
                    if _prefixes
                    else '')

        tel = ttl_export_dir = Path(cls.ng.filename).parent.as_posix()
        ttlexp = f',{ind}ttl_export_dir={tel!r}'

        # FIXME prefixes should be separate so they are accessible in the namespace
        # FIXME ilxtr needs to be detected as well
        # FIXME this doesn't trigger when run as an import?
        out += f'config = Config({cls.ng.name!r},{ind}file=__file__{ttlexp}{prefixes})\n\n'  # FIXME this is from neurons.lang

        return out