DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
felixRPCServer Namespace Reference

Classes

class  FelixFuncs
 
class  RequestHandler
 

Functions

 shell_source (script)
 
 callSubp (appDict)
 

Variables

str pathBase = "<felix_dist_dir>"
 
 server = SimpleXMLRPCServer(("0.0.0.0", 9999),requestHandler=RequestHandler)
 

Function Documentation

◆ callSubp()

felixRPCServer.callSubp ( appDict)

Definition at line 18 of file felixRPCServer.py.

18def callSubp(appDict):
19 p = Popen(appDict, stdin=PIPE, stdout=PIPE, stderr=PIPE)
20 output, err = p.communicate(b"input data that is passed to subprocess' stdin")
21 return output, err, p.returncode
22

◆ shell_source()

felixRPCServer.shell_source ( script)
Sometime you want to emulate the action of "source" in bash,
settings some environment variables. Here is a way to do it.

Definition at line 8 of file felixRPCServer.py.

8def shell_source(script):
9 """Sometime you want to emulate the action of "source" in bash,
10 settings some environment variables. Here is a way to do it."""
11 import subprocess, os
12 pipe = subprocess.Popen(". %s; env" % script, stdout=subprocess.PIPE, shell=True)
13 output = pipe.communicate()[0]
14 #print output
15 env = dict((line.split("=", 1) for line in output.splitlines()))
16 os.environ.update(env)
17

Variable Documentation

◆ pathBase

str felixRPCServer.pathBase = "<felix_dist_dir>"

Definition at line 6 of file felixRPCServer.py.

◆ server

felixRPCServer.server = SimpleXMLRPCServer(("0.0.0.0", 9999),requestHandler=RequestHandler)

Definition at line 30 of file felixRPCServer.py.