Actually, it does not "execute the code only the first time", more accurately, it "initializes the code only the first time". But you are correct, it exposes the os.* module into the current namespace so you don't have to go to convoluted lengths to get to it.