Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?
Bhawani Singh
bhawani90 at gmail.com
Fri May 2 15:55:18 EDT 2014
I have created the script till here ..
import os
os.chdir("/var/log")
fd = open("t1.txt", "r")
for line in fd:
if re.match("(.*)(file1)(.*)", line):
print line,
Output :
file1
--------------------
this script i ran on the linux server, but now i want to run this script from another linux server and get the output displayed there..how can i do that...
i tried to use : pexpect
but getting no help..
More information about the Python-list
mailing list