I guess you have saved the python-code in a file that you execute using the electrum-console. Is this right?
In which folder do you need to save this file so that it is accesible from the console? How do you execute the code?
Sorry, about my noob-question, but I have read a book about Python a long time ago but have forgotten most of it.
This is right. Save the code in a file, for instance 'servertest.py'. This file can be saved anywhere on your system.
How to run it: assuming the file was saved to D:\servertest.py, you would type the following command in the console to execute it:
execfile("D:\\servertest.py")
No problem, the Electrum console will always use the embedded Python 2.7 runtime anyway.