.. currentmodule:: tango .. highlight:: python :linenothreshold: 10 .. _pytango-howto: ====== How to ====== This is a small list of how-tos specific to PyTango. A more general Tango how-to list can be found `here `_. How to contribute ----------------- Everyone is welcome to contribute to PyTango project. If you don't feel comfortable with writing core PyTango we are looking for contributors to documentation or/and tests. It refers to the next section, see :ref:`how-to-contribute`. Check the default TANGO host ---------------------------- The default TANGO host can be defined using the environment variable :envvar:`TANGO_HOST` or in a `tangorc` file (see `Tango environment variables `_ for complete information) To check what is the current value that TANGO uses for the default configuration simple do:: >>> import tango >>> tango.ApiUtil.get_env_var("TANGO_HOST") 'homer.simpson.com:10000' Check TANGO version ------------------- There are two library versions you might be interested in checking: The PyTango version:: >>> import tango >>> tango.__version__ '9.5.0' >>> tango.__version_info__ (9, 5, 0) and the Tango C++ library version that PyTango was compiled with:: >>> import tango >>> tango.constants.TgLibVers '9.5.0' Start server from command line ------------------------------ To start server from the command line execute the following command: .. sourcecode:: console $ python .py Ready to accept request To run server without database use option -nodb. .. sourcecode:: console $ python .py -nodb -port 10000 Ready to accept request Note, that to start server in this mode you should provide a port with either \-\-post, or \-\-ORBendPoint option Additionally, you can use the following options: -h, -?, \-\-help : show usage help -v, \-\-verbose: set the trace level. Can be user in count way: -vvvv set level to 4 or --verbose --verbose set to 2 -vN: directly set the trace level to N, e.g., -v3 - set level to 3 \-\-file : start a device server using an ASCII file instead of the Tango database \-\-host : force the host from which server accept requests \-\-port : force the port on which the device server listens \-\-nodb: run server without DB \-\-dlist : the device name list. This option is supported only with the -nodb option \-\-ORBendPoint giop:tcp::: Specifying the host from which server accept requests and port on which the device server listens. Note: any ORB option can be provided if it starts with -ORB