I'm looking into how the Python's pack function is implemented. Does anyone know where the source is located? I grep the entire lib folder but couldn't find it. I have the unfortunate task of converting some python code which uses pack extensively into C++ :(
Algorithm for Python's pack function
Collapse
X
-
I believe that function is located in (starting from your python install folder): Lib/struct.pyc
Which is, unfortunately, compiled python code. So you can't read it, unless you can find a python decompiler. -
That's really unfortunately. Is there a better description what the function does other than what is given in the manual for struct module pack?Originally posted by YarrOfDoomI believe that function is located in (starting from your python install folder): Lib/struct.pyc
Which is, unfortunately, compiled python code. So you can't read it, unless you can find a python decompiler.Comment
Comment