I want to pass my program a file and get a function out of it.
For example, I have a file,
ImportError: Import by filename is not supported.
You could open the file and execute it using
f = open('foo.py') source = f.read() exec(source) print bar()
You could even look for the specific function using