On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > > On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer > <arj.pyt...@gmail.com> declaimed the following: > > >I have this main script: > >https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py > > > > Well, that file name scares me... > > __main__ is the name Python uses internally for the, well, main > program > (whatever the real file name is), and becomes part of the convention > > if __name__ == "__main__": > #running as stand-alone program > #do stuff > > where imported files will appear with the name by which they were imported. >
In a package, __main__.py does that same job. ChrisA -- https://mail.python.org/mailman/listinfo/python-list