Sunday, January 30, 2022

[SOLVED] Which python script is executed if directory path is passed as command line argument to python?

Issue

Which script is executed if a directory is passed as argument to python (e.g. if python is called in this way: $ python3 Domoticz-Google-Assistant/)?

Best regards,

wewa


Solution

If you execute a directory as an argument to python, the file named __main__.py will be executed.



Answered By - Connor
Answer Checked By - David Marino (WPSolving Volunteer)