To get the "code object" c of my_class I can do;
c = compile(inspect .getsource(my_c lass), "<script>", "exec")
This fails when inspect can't get hold of the source of my_class,
for instance when my_class is in a pyc file.
Is there another way of getting c?
c = compile(inspect .getsource(my_c lass), "<script>", "exec")
This fails when inspect can't get hold of the source of my_class,
for instance when my_class is in a pyc file.
Is there another way of getting c?
Comment