The temscript server¶
If remote scripting of the microscope is required as provided via the RemoteMicroscope class, the temscript
server must run on the microscope PC. The temscript server provides a Web-API to the interface.
Warning
The server provides no means of security or authorization control itself.
Thus it is highly recommended to let the server only listen to internal networks or at least route it through a reverse proxy, which implements sufficient security.
Command line¶
The temscript server is started by the temscript-server command line script provided with the temscript`
package (obviously temscript must also be installed on the microscope PC).
usage: temscript-server [-h] [-p PORT] [--host HOST] [--null]
optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT Specify port on which the server is listening
--host HOST Specify host address on which the the server is listening
--null Use NullMicroscope instead of local microscope as backend
Python command¶
Alternatively the temscript server can also be run from within Python using run_server() function.
- temscript.run_server(argv=None)¶
Main program for running the server
- Parameters:
argv (List of str (see sys.argv)) – Arguments