I am finding myself a little confused about how Python imports. Would the following be a correct statement:
In any Python interactive shell, if the shell (since it was initiated or opened) has never before imported "myScript.py" then if the user types in "myScript" he will get an error like: NameError, name 'myScript' is not defined. At this point, entering the command "import myScript" will import myScript.py from the native OS diskfile system, i.e. from Windows folder or Unix directory, based upon a search path directed by "sys.path". Even if "myScript" is defined or has been imported in some other currently existing Python shell, the shell we are currently in will import from disk and not from the other shell.
The reason I ask is, the Blender 3D application I am working with comes with a built in Python shell. Blender can run continuously while the user chooses to open, close, re-open the built in Python shell. If, after importing "myScript" into a shell, I close the shell, make some changes to myScript.py through an external editor, and re-open a new Python shell, the definition for "myScript" is no longer there (NameError: name 'myScript' is not defined). But when i import myScript, it imports the old version, so apparently Blender has saved the old version somewhere and is allowing the Python shell to reload it. This violates Python rule that if not currently defined in namespace, import myScript should always import from the native OS file system, never from some previously loaded module, correct?