4 ms·
This is a cute little hack, and quite possibly a very useful one. (And if it isn't useful, then it is certainly interesting and instructive.) However: Please,
by ggchappell 15y ago
This is a cute little hack, and quite possibly a very useful one. (And if it isn't useful, then it is certainly interesting and instructive.)
However:
Please, please, please don't use or recommend things like "from pbs import * ". Namespace pollution is bad enough when importing a documented collection of functions. Importing functions that are named based on whatever happens to be in my path at the moment ... that's seriously scary.
But "import pbs" looks like fun. :-) And "pbs.ls" isn't that much to type.
As The Zen of Python says:
] Namespaces are one honking great idea -- let's do more of those!
P.S. Hmmm ... but does "import pbs" work? Haven't tried it.