I have this module that calls main() function:
## This is mymodules ##
def restart():
r = input('Do you want to build another configuration file?\n1. Yes\n2. No\n')
if r == '1':
main()
elif r == '2':
os.system('pause')
The main() is in another script that loads this module. However when it calls it says main() is not defined. essentially this is what I have in my test:
import mymodules as my
def main():
print('good')
my.restart()
When this runs I want the my.restart() to be able to call the main() defined.