Would it be possible to call Python codes I wrote in Text Editor from the Python console so that I can interact with it?
If you name your script
Beware - after you imported the script for the first time you can't import it again. If you make changes to the module you can use
You can retrieve the Text datablock's text as string and run it in the context of the Python Console.
Here's an addon that makes it easy to do so:
Globals of your script will be added to the globals of the Python Console environment.