3 ms·
What's the point of not importing a library/module? It's not like cheating or something.
by ofrzeta 7y ago
What's the point of not importing a library/module? It's not like cheating or something.
- dijit 7y agoEh. Pros and cons. I think most people are spoiled by being able to install anything; I work in a locked down environment and getting anything non-sanctioned in is very difficult, and the sanctioning process is tedious if nothing else. That, and the fact that libraries are evolving- which is why we end up with horrible things like package/library version pinning.
- ofrzeta 7y agoSure, but we're talking (with the problem at hand) about Python standard libraries that get shipped with the Python distribution and not some NPM or pip universe. For instance the "os" module has an "urandom" function that does essentially the same as the "dd" in the bash script. Of course you could also read from the device so you wouldn't need to import "os". You would need to import "random" to get access to the random number generator, though, but it's still part of the standard library.