Hey everyone!
So, I’ve been trying to figure out how to run a Python file from another Python function, and I’m kinda stuck. Like, I know I can use `subprocess` or `exec()`, but I’m not sure which one’s better or if there’s a cleaner way.
I tried googling, but most answers are either too complicated or don’t explain it in a way that makes sense to me lol.
Anyone got tips on how to run a Python file from another Python function effectively? Maybe something that doesn’t feel like a hack?
Also, if there are any gotchas or things to watch out for, pls lmk!
Thanks in advance!
So, I’ve been trying to figure out how to run a Python file from another Python function, and I’m kinda stuck. Like, I know I can use `subprocess` or `exec()`, but I’m not sure which one’s better or if there’s a cleaner way.
I tried googling, but most answers are either too complicated or don’t explain it in a way that makes sense to me lol.
Anyone got tips on how to run a Python file from another Python function effectively? Maybe something that doesn’t feel like a hack?
Also, if there are any gotchas or things to watch out for, pls lmk!
Thanks in advance!
