Closed tonigi closed 4 years ago
we always use just the glob function of the glob module. Do you use any other?
Internally I agree. But that alters the behaviour in user code. E.g., as a user
import glob
#my code uses glob.glob and works
then
import glob
from htmd.ui import *
#my code is unchanged and yet it does not work any more
and then
from htmd.ui import *
import glob
#my code is still unchanged and now works again
Unfortunately all the tutorials of HTMD use glob as a function so we would need to change those as well. I would say that at the point where you have your own code with glob.glob you should not import *
anymore anyway and import individual modules of HTMD
I will close this issue since we are not planning on changing this behaviour. Same thing would happen if the user was doing from glob import glob
and we did import glob
so it's a decision we will have to live with.
https://github.com/Acellera/htmd/blob/d8b7b249a839c38570b6275fde934e48f7d569a3/htmd/ui.py#L71
This exports "glob" as a function in the user namespace, which is unexpected. E.g.