Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27208
| References | <CAAoZyYMEraa_OTyxui484-bdx96Jvd9LTmbb5Qw2EfQXd_wkfQ@mail.gmail.com> |
|---|---|
| Date | 2012-08-17 08:43 +1000 |
| Subject | Re: remote read eval print loop |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3400.1345157033.4697.python-list@python.org> (permalink) |
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 | Next — Next in thread | Find similar | Unroll 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