|
|
|
|
|
by sigg3
1045 days ago
|
|
IMO Python imports behave like the bash source command. This is why people use the `if __name__ == "__main__"` so the majority of people will address it in all their scripts even if they don't know the reason why. It's a feature not a bug IMO. You can use importing a .py file as a singleton hack. You can also use `refresh` to re-load a module, to clear it of any runtime overrides. |
|
`source` is much more primitive.