Re: how to execute "OTHER" python scripts
Posted: Thu Mar 29, 2018 3:11 pm
Thanks. Good to know another alternativebenalb wrote: ↑Thu Mar 29, 2018 2:39 pmI usually do this:
and then, can do:Code: Select all
cat test01.py def my_test(): print("hello, test") def main(): my_test() if __name__ == "__main__": main()
Code: Select all
>>> import test01 >>> from test01 import my_test >>> >>> test01.my_test() hello, test >>> test01.main() hello, test >>> >>> my_test() hello, test