Hey gsabhay77,
Your ability to import other modules will depend on your PYTHONPATH which is specific to your system where Splunk is running. The easiest way to debug the path that the script is running from is to output sys.path:
import sys
print(sys.path) // ['', '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8', ...]
Without getting too much into your system setup if you simply need the directory that your my_submit.py file resides in to be added to the path you could do so by adding the current absolute path that the file is running from using:
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
Adding those lines to the top of your script should hopefully resolve your issue.
... View more