Dec-06-2017, 09:43 PM
Yes, you will need to import the function every time. But you have options to do that in different ways. You could make one script which will import all your functions. Or if you really need just single functions separately, you can play with
http://thepythonguru.com/what-is-if-__name__-__main__/
This will make your python script an executable. In that case you may want to use command line arguments, to pass them to function. Check this out:
https://www.tutorialspoint.com/python/py...uments.htm
if __name__ == “__main__”
, for example:http://thepythonguru.com/what-is-if-__name__-__main__/
This will make your python script an executable. In that case you may want to use command line arguments, to pass them to function. Check this out:
https://www.tutorialspoint.com/python/py...uments.htm