I'm working on a function that automatically takes some code I've written and creates checksums in python to be uploaded along with the source code.
The issue is I need to dynamically discover other functions within the same module that I'm currently in.
This is so we can continue to write more code and have it automatically updated.
TL:DR; Making An Automatic Source Code Checksum and Upload Tool For Functions In Same Source File. How do I Locate All The Other Functions?
eg:
def func1(y):
some random stuff.....
return x
def autochecksum():
for func in module:
checksum = md5(inspect.code(func)).hexdigest
othermodule.upload(inspect.code(func), checksum)
Closest I Could get was (pure fluke all the function names started with get_):
def update_jms_directory():
import appdata.transfer.uploads as uploads
for function in dir(uploads):
if function.startswith("get_"):
package_function()