| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Public Attributes | List of all members
GaudiMP.Parallel.SshSession Class Reference
Inheritance diagram for GaudiMP.Parallel.SshSession:
[legend]
Collaboration diagram for GaudiMP.Parallel.SshSession:
[legend]

## Public Member Functions
def | __init__ (self, hostname)
def | __del__ (self)

## Public Attributes
| host
| session

## Detailed Description

Definition at line 209 of file Parallel.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiMP.Parallel.SshSession.__init__ | ( |  | self,
|  |  | hostname
| ) |  |

Definition at line 210 of file Parallel.py.

210 def __init__(self, hostname):
211 import pyssh
212 import pp
213 self.host = hostname
214 ppprefix = os.path.dirname(os.path.dirname(pp.__file__))
215 self.session = pyssh.Ssh(host=hostname)
216 self.session.open()
217 self.session.read_lazy()
218 self.session.write('cd %s\n' % os.getcwd())
219 self.session.read_lazy()
220 self.session.write('setenv PYTHONPATH %s\n' % os.environ['PYTHONPATH'])
221 self.session.read_lazy()
222 self.session.write(
223 'setenv LD_LIBRARY_PATH %s\n' % os.environ['LD_LIBRARY_PATH'])
224 self.session.read_lazy()
225 self.session.write('setenv ROOTSYS %s\n' % os.environ['ROOTSYS'])
226 self.session.read_lazy()
227 self.session.write('%s %s/scripts-%s/ppserver.py \n' %
228 (sys.executable, ppprefix, sys.version.split()[0]))
229 self.session.read_lazy()
230 self.session.read_lazy()
231 print 'started ppserver in ', hostname
232

## ◆ __del__()

def GaudiMP.Parallel.SshSession.__del__ | ( |  | self | ) |

Definition at line 233 of file Parallel.py.

233 def __del__(self):
234 self.session.close()
235 print 'killed ppserver in ', self.host

## Member Data Documentation

## ◆ host

GaudiMP.Parallel.SshSession.host

Definition at line 213 of file Parallel.py.

## ◆ session

GaudiMP.Parallel.SshSession.session

Definition at line 215 of file Parallel.py.

The documentation for this class was generated from the following file:

- GaudiMP/python/GaudiMP/Parallel.py