I am looking at different ways of using python to make a dll. One suggestion I ran into was to use py2exe to compile the code to an exe and then rename it as a DLL and call it with the program. I have searched for other discussion as to whether this would work, and from what I have read it seems like you'd have to do more than just change the name and call it from another file, but I have not seen an explicit answer either way.
Obviously I'd like a little explanation as to why this can or cannot be done. What changes can you make to an EXE written like a DLL to make it a DLL? (like editing the PE header).