Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70875

Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?

X-Received by 10.50.93.101 with SMTP id ct5mr591016igb.7.1399060518693; Fri, 02 May 2014 12:55:18 -0700 (PDT)
X-Received by 10.182.199.67 with SMTP id ji3mr18996obc.38.1399060518424; Fri, 02 May 2014 12:55:18 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r10no176790igi.0!news-out.google.com!en3ni431igc.0!nntp.google.com!r10no176783igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Fri, 2 May 2014 12:55:18 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=168.159.213.203; posting-account=B532twoAAAAwMm8RB4azb7HO6OIcv7zP
NNTP-Posting-Host 168.159.213.203
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <a6716c27-bd6d-4fc5-8932-55470a78deb2@googlegroups.com> (permalink)
Subject Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?
From Bhawani Singh <bhawani90@gmail.com>
Injection-Date Fri, 02 May 2014 19:55:18 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:70875

Show key headers only | View raw


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..

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Hi. I want to create a script to read a file placed in a remote linux server using python..need help..? Bhawani Singh <bhawani90@gmail.com> - 2014-05-02 12:55 -0700
  Re: Hi. I want to create a script to read a file placed in a remote linux server using python..need help..? Denis McMahon <denismfmcmahon@gmail.com> - 2014-05-02 22:32 +0000
    Re: Hi. I want to create a script to read a file placed in a remote linux server using python..need help..? Roy Smith <roy@panix.com> - 2014-05-02 18:51 -0400

csiph-web