I need to cat a file inside the OS module of python.
What I'm trying to do is what I have accomplished in Perl. Please note the cat /tmp/illinois.txt
my $cmd = `$ENV{BB} $ENV{BBDISP} "status $host.$test $COLOR \`date\`
\`cat /tmp/illinois.txt\`"`;
I would like to do the same thing in python.
cmd = "{BB} {BBDISP} \"status {NODE}.{TEST} {COLOR} {NOW}\n {MSG}\n\"".format(
TEST = "gov-affairs-MemoryUtilization",
BB = os.environ["BB"],
BBDISP = os.environ["BBDISP"],
COLOR = COLOR,
NOW = datetime.datetime.now(),
MSG=`cat /tmp/illinois.txt\`,
NODE="xxxxx")