This may be a noobie questions, but…
So I have a pyc file that I need to use, but I don’t have any documentation on it. Is there a way to find out what classes and functions are in it and what variables they take? I don’t need to code, just how to run it.
Thanks
if you stick it on your import path and import it by name, you can use
diryou can also use `help’
to get the docstring. Both of these can be used on anything that
foocontains as well. Note that bytecode changes between releases so it may or may not work for your version of python. If this is the case, the best that I can say is to try different versions until one works.If you need to recover the arguments for a function, you first get the argcount
the arguments are then the first argcount variables of
This doesn’t tell you what the function expects them to be and is only really useful if it doesn’t have a docstring but it can be done.