Interesting. Can you explain how you start and run this script from the console?
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")
BTW: Another noob question: That you can run all kind of processes out of the Electrum console: Isnt that a security risk?
As long as you are not executing malicious scripts, I don't think so. Perhaps a dev can further comment on this.
PS. I have a Python3 version installed. Could I use your code?
(I'm assuming you are a Windows user, let me know if that's not the case.)
No problem, the Electrum console will always use the embedded Python 2.7 runtime anyway.