Apr-11-2024, 07:04 AM
I would start with the module as-is and just add the code from my example. See how long it takes to import. Python is pretty quick about loading modules. I've never had a 1.1 MB module, but I'm sure I regularly import modules that add up to more than that. Don't worry about 80 columns. That is for readabiliy, and nobody is going to read this code.
You can place import commands anywhere in your python code but people expect them at the top of the module. It makes them easy to find.
You can import the module anywhere you want to use it. After the module is imported the first time, subsequent imports reuse the same module object.
You can place import commands anywhere in your python code but people expect them at the top of the module. It makes them easy to find.
You can import the module anywhere you want to use it. After the module is imported the first time, subsequent imports reuse the same module object.