It wouldn't be too difficult to write a file object wrapper that emulates tee,
for instance (untested):
class tee(object):
def __init__(self, file_objs, autoflush=True):
self._files = file_objs
self._autoflush = autoflush
def write(self, buf):
for f in self._files
On 10/10/2017 10:09 AM, Vail, Rick wrote:
> I have a script for Cisco devices that will do configuration or any CLI
> command. What I would like to do is print the output to my terminal(windows)
> and to a file. I can come up with stdout parameters
> To print to a file but not to the screen and
On 2017-10-10 17:00, Vail, Rick wrote:
I have a script for Cisco devices that will do configuration or any CLI
command. What I would like to do is print the output to my terminal(windows)
and to a file. I can come up with stdout parameters
To print to a file but not to the screen and when I re
Follow Presidio on Twitter]<http://www.twitter.com/presidio>
From: Vail, Rick
Sent: Tuesday, October 10, 2017 7:04 AM
To: 'python-list@python.org'
Subject: Printing to a file and a terminal at the same time
I have a script for Cisco devices that will do configuration or any CLI
I have a script for Cisco devices that will do configuration or any CLI
command. What I would like to do is print the output to my terminal(windows)
and to a file. I can come up with stdout parameters
To print to a file but not to the screen and when I remove the stdout part it
prints to the sc