Re: Instatiating module / Reusing module of command-line tool

2022-05-07 Thread Cameron Simpson
On 06May2022 14:11, Loris Bennett wrote: >r...@zedat.fu-berlin.de (Stefan Ram) writes: >> If you need a class, you can write a class. >> >> When one imports a module, the module actually gets executed. >> That's why people write "if __name__ == '__main__':" often. >> So, everything one wan

Re: Instatiating module / Reusing module of command-line tool

2022-05-06 Thread Loris Bennett
r...@zedat.fu-berlin.de (Stefan Ram) writes: > "Loris Bennett" writes: >>My question: What is the analogue to initialising an object via the >>constructor for a module? > > If you need a class, you can write a class. > > When one imports a module, the module actually gets executed. > That's