Hi,
I have a perl script named "my_eth-traffic.pl" which calculates the tx and
rx speed of the Ethernet interface in Mb.
I want to run this script from another script and want the output in other
file.
So i wrote the following script but not getting the output.
#!/usr/bin/python
import sys
import subprocess
import datetime
import os
import time
comand8 = "/root/Desktop/my_eth-traffic.pl eth0 M"
filename = logfilename+packetsize+'-'+formated_string+'.txt'
logfile = open("/root/Desktop/speed.txt", 'w')
proc=subprocess.Popen(comand8,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
for line in proc.stdout:
logfile.write(line)
--
https://mail.python.org/mailman/listinfo/python-list