r/pythonhelp • • 11h ago

Test code very broken with os lib

https://github.com/jacobrinaldi/mkcmd/blob/main/tests/testMain.py

I making a tool and i wanted to make it much more lightweight while still being coded in python but this just breaks i was told be some to remove global in my if statements but that didnt help.

0 Upvotes

5 comments sorted by

View all comments

1

u/Educational-Paper-75 7h ago

shebang and extension are local variables and thus unknown in the install function. Either declare them globally as well or pass them in the install function calls as function arguments (to added function parameters).

1

u/LNXByte 1h ago

Sorry for asking but can you dumb it down a little bit? I'm still very new programming