Mar-21-2024, 12:12 AM
This is not about the include command.
I am a PHP developer, just starting on python. I got stuck when I tried to save parts of the scripts into a separate .py file, just to avoid repetition, nothing more. Reading about module scopes, globals and parameters did not help to solve the include problem. Errors pop up one after another. This is why I ask this simple question:
Is there a simple way to put three .py scripts together?
So that the system would treat them as one .py?
Maybe using the os module, exiting to the operating system, creating a new .py script on the fly (by appending three .py's) and executing it?
I am a PHP developer, just starting on python. I got stuck when I tried to save parts of the scripts into a separate .py file, just to avoid repetition, nothing more. Reading about module scopes, globals and parameters did not help to solve the include problem. Errors pop up one after another. This is why I ask this simple question:
Is there a simple way to put three .py scripts together?
So that the system would treat them as one .py?
Maybe using the os module, exiting to the operating system, creating a new .py script on the fly (by appending three .py's) and executing it?