1 from __future__
import division, absolute_import
3 Displays information in the global database. By default, it displays to the screen,
4 but you may send output to a file using /Output
7 from RO.StringUtil
import quoteStr
9 __all__ = [
"showBlock"]
11 blocks = (
"AxeLim",
"Earth",
12 "Inst",
"Obj",
"TelMod",
"Tune",
"Weath")
13 attrs = (
"axeLim",
"earth",
"inst",
"obj",
"telMod",
"tune",
"weath")
14 blockAttrDict = dict(zip(blocks, attrs))
17 """ @param[in,out] tccActor tcc actor
18 @param[in,out] userCmd mirror command
20 gotBlock = userCmd.parsedCmd.paramDict[
"blockname"].valueList[0].keyword
21 currBlock = getattr(tccActor, blockAttrDict[gotBlock])
23 if userCmd.parsedCmd.qualDict[
'output'].boolValue:
24 filePath = userCmd.parsedCmd.qualDict[
'output'].valueList[0]
25 with open(filePath,
'w')
as f:
29 f = StringIO.StringIO()
31 listOfLines = f.getvalue().split(
"\n")
32 for line
in listOfLines:
35 kwForm =
'Text=' + quoteStr(line)
36 tccActor.writeToOneUser(
'i', kwForm, cmd=userCmd)
37 userCmd.setState(userCmd.Done)