add a run_server class method to Device
Hi Tiago,
Another small PR to add a run_server
class method to Device
. We have a lot of servers that actually consist of a single TANGO class, so it would be quite useful for us. It could also be nice for tutorials and examples.
Also, it gets the server name from the class instead of the file name. It is quite useful to break this rule to run the server from the cli and to comply with the standard names for python modules. Example:
mydevice.py
defines the device class and the main execution:
class MyDevice(Device):
[...]
if __name__ == "__main__":
MyDevice.run_server()
It is then possible to run the server using:
$ python -m mydevice my_instance_name
Thanks