If I wanted to save the binary information of an executable as a string object in a .py file what would be the easiest way to go about that without receiving null byte and EOF errors.. I've messed around with converting each char to its ordinal and then separating them with a "." but that effectively quadruples the string size. I also read about the array and struct modules but am unsure of which direction to proceed. Any guidance would be appreciated.

Look at module base64

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.