Back to index

salome-kernel  6.5.0
Functions
NSparam Namespace Reference

Functions

def getNSparams

Function Documentation

def NSparam.getNSparams (   info = "")
check environment for omniORB configuration file.
parse the file to find the line defining naming service  host and port,
set environment variables NSPORT and NSHOST,
get host and port,
if   info==host print host
elif info==port print host
else    print 2 strings on stdout on one line: host port

Definition at line 27 of file NSparam.py.

00027 
00028 def getNSparams(info=""):
00029     """
00030     check environment for omniORB configuration file.
00031     parse the file to find the line defining naming service  host and port,
00032     set environment variables NSPORT and NSHOST,
00033     get host and port,
00034     if   info==host print host
00035     elif info==port print host
00036     else    print 2 strings on stdout on one line: host port
00037     """
00038     from salome_utils import getORBcfgInfo
00039     my_version, my_host, my_port = getORBcfgInfo()
00040     if info=='host':
00041         # keep print, stdout used in shell
00042         print my_host
00043         os.environ['NSHOST']=my_host
00044         return my_host
00045         pass
00046     elif info=='port':
00047         # keep print, stdout used in shell
00048         print my_port
00049         os.environ['NSPORT']=my_port
00050         return my_port
00051         pass
00052     else:
00053         # keep print, stdout used in shell
00054         print  my_host, my_port
00055         return my_host, my_port
00056     pass
00057 
00058 # ------------------------------------------------------------------------

Here is the call graph for this function: