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


Groups > comp.lang.python > #27208

Re: remote read eval print loop

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'string.': 0.04; 'python': 0.09; 'bindings': 0.09; 'command-line': 0.09; 'high-level': 0.09; 'aug': 0.13; 'extensions': 0.13; "hasn't": 0.15; 'server,': 0.15; 'eval': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'instruction,': 0.16; 'optionally': 0.16; 'parameters,': 0.16; 'side.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'working.': 0.17; 'code,': 0.18; 'define': 0.20; 'parameters': 0.20; 'received:209.85.214.174': 0.21; 'http': 0.22; 'command': 0.24; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'run': 0.28; 'consisting': 0.29; 'this.': 0.29; 'that.': 0.30; 'fri,': 0.30; 'sense': 0.31; 'space,': 0.32; "who's": 0.32; 'running': 0.32; 'print': 0.32; 'instead,': 0.33; 'anyone': 0.33; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'server': 0.35; 'eric': 0.35; 'protocol': 0.35; 'remote': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'add': 0.36; 'client': 0.36; 'xml': 0.37; 'communicate': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'hello,': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'easy': 0.60; 'side': 0.61; "you'll": 0.62; 'please,': 0.62; 'world': 0.63; 'six': 0.65; 'subject:read': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+2w8EHve07oI1byyyohP7i9kVtPgQryBjV2R4BZbfaU=; b=AIhrv8/5+HpdYGU3YMpadkRDYt7dsAi99O6nxlElXhaIIPP9QN2NegZCJFi9bGNRI5 Mf2tBsN2/5L4SZk00DfcQLw5DJMjcr8CCW7KLB4ffXajWWtanIutMrCtHt7iUU1Za3mT ELg82LpaaG/2JF9qCosZkNBPHY7SIdj325NV+ZxkMh5vQVrtCTi6fr7J7W64COQjatAb 6KoKxGwqGb2jGzWo723Cm7X96bhnpYXetyJmXfHnY8JxZk+Vi3tJnywhFYuGp6GihHPH a0Zw0/HbF+vsIsJkyjZRlGvaagWKoJZSvGqQC8dB7RgWqhZ33u3s6SqmE9C9z0+pVPuD Zdgg==
MIME-Version 1.0
In-Reply-To <CAAoZyYMEraa_OTyxui484-bdx96Jvd9LTmbb5Qw2EfQXd_wkfQ@mail.gmail.com>
References <CAAoZyYMEraa_OTyxui484-bdx96Jvd9LTmbb5Qw2EfQXd_wkfQ@mail.gmail.com>
Date Fri, 17 Aug 2012 08:43:50 +1000
Subject Re: remote read eval print loop
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3400.1345157033.4697.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1345157033 news.xs4all.nl 6962 [2001:888:2000:d::a6]:37301
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27208

Show key headers only | View raw


On Fri, Aug 17, 2012 at 6:54 AM, Eric Frederich
<eric.frederich@gmail.com> wrote:
> Hello,
>
> I have a bunch of Python bindings for a 3rd party software running on the
> server side.
> I can add client side extensions that communicate over some http / xml type
> requests.
> So I can define functions that take a string and return a string.
> I would like to get a simple read eval print loop working.

Let's stop *right there*. You're looking for something that will run
on your server, take strings of text from a remote computer, and eval
them.

Please, please, please, on behalf of every systems administrator in
the world I beg you, please do not do this.

Instead, define your own high-level protocol and have your server
respond to that. One excellent way to keep things tidy is to use a
'command, parameters, newline' model: each line of text is one
instruction, consisting of a command word, then optionally parameters
after a space, then a newline. It's easy to debug, easy to read in
your code, and makes sense to anyone who's used a command-line
interface.

Six months from now, when your server still hasn't been compromised,
you'll appreciate the extra design effort :)

Chris Angelico

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


Thread

Re: remote read eval print loop Chris Angelico <rosuav@gmail.com> - 2012-08-17 08:43 +1000
  Re: remote read eval print loop Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-17 02:27 +0000
    Re: remote read eval print loop Alister <alister.ware@ntlworld.com> - 2012-08-17 06:38 +0000
    Re: remote read eval print loop Chris Angelico <rosuav@gmail.com> - 2012-08-17 17:25 +1000
      Re: remote read eval print loop rusi <rustompmody@gmail.com> - 2012-08-17 04:09 -0700
        Re: remote read eval print loop Chris Angelico <rosuav@gmail.com> - 2012-08-18 00:06 +1000

csiph-web