Python reload error
Question: I'm using Python in IDLE, and I have a line `reload(sim_map_training)`.
However, when I run the file, it says `NameError: name 'sim_map_training' is
not defined`, even though I'm sure I have a file `sim_map_training.py` in the
same directory as the file. I'm really confused.. What could be the problem?


Answer: The name `sim_map_training` in the context where you're reloading must refer
to the module. Just writing

    
    
    import sim_map_training  # =  sim_map_training = sys.modules['sim_map_training']
    reload(sim_map_training)
    

will do.

