Re: [Tutor] How to get smooth, terminal-like interaction over the web

2008-11-26 Thread Kent Johnson
On Tue, Nov 25, 2008 at 6:50 PM, tchomby <[EMAIL PROTECTED]> wrote:
> It's a simple text-based program, the interaction would work perfectly in a
> terminal with the computer printing out lines of text to the user, and the 
> user
> typing in lines of text and pressing return, and this is the kind of
> interaction I want to enable on a web page.
>
> Can anyone point me in the direction I should be looking, if I want to
> implement this kind of interaction over the net using python?

You might look for chat programs. IIRC Twisted includes a demo chat
server. Or these might be useful models:
http://www-ai.ijs.si/eliza/eliza.html
http://nlp-addiction.com/eliza/

Kent
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to get smooth, terminal-like interaction over the web

2008-11-26 Thread tchomby
On Wed, Nov 26, 2008 at 06:48:52AM -0500, bob gailer wrote:
>
> See http://code.google.com/p/pythoninthebrowser/.
>
>> I'm looking for simplicity and ease of use for a python programmer.

I was just thinking that I'm sure I've seen Python and Ruby interpreters 
implemented in javascript or something like that. Thanks, I'll check it out. I 
guess the problem may be that I don't really want to give the user access to a 
full Python shell, that sounds exploitable. But I'll look into it. If not, I 
guess I'll have to learn javascript instead.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to get smooth, terminal-like interaction over the web

2008-11-26 Thread bob gailer

tchomby wrote:
I have an idea for a python program I want to write. I want to make this 
program accessible over the web for people to play with. And that's where I'm 
stuck -- I don't know what module, framework, protocol, or whatever to use to 
webify it.


It's a simple text-based program, the interaction would work perfectly in a 
terminal with the computer printing out lines of text to the user, and the user 
typing in lines of text and pressing return, and this is the kind of 
interaction I want to enable on a web page.


Can anyone point me in the direction I should be looking, if I want to 
implement this kind of interaction over the net using python? I'm aware of CGI 
and HTML forms and the python modules for it, but I think that would require 
the entire page to be reloaded every time there's an input or output. So am I 
looking at ajax, javascript, etc.? I'm a little bit lost, not knowing what's 
available out there.
  


See http://code.google.com/p/pythoninthebrowser/.


I'm looking for simplicity and ease of use for a python programmer.
  

--
Bob Gailer
Chapel Hill NC 
919-636-4239


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to get smooth, terminal-like interaction over the web

2008-11-25 Thread Alan Gauld


"tchomby" <[EMAIL PROTECTED]> wrote


It's a simple text-based program, the interaction would work 
perfectly in a
terminal with the computer printing out lines of text to the user, 
and the user

typing in lines of text and pressing return, and this is the kind of
interaction I want to enable on a web page.


For small apps I'd suggest biting the bullet and learning JavaScript
and coding it in the browser.

The next best thing is either a Java applet - which can be written
in Jython - or an Ajax application. Both of these have a steepish
learning curve which is why I suggest learning JavaScript!

the entire page to be reloaded every time there's an input or 
output. So am I
looking at ajax, javascript, etc.? I'm a little bit lost, not 
knowing what's

available out there.


Yes I think one of JavaScript, Jython, or Ajax will be best.
I believe that Django supports Ajax and I know TurboGears does.
If you go the JavaScript route check out Mochikit which makes
JS more like Python!

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] How to get smooth, terminal-like interaction over the web

2008-11-25 Thread tchomby
I have an idea for a python program I want to write. I want to make this 
program accessible over the web for people to play with. And that's where I'm 
stuck -- I don't know what module, framework, protocol, or whatever to use to 
webify it.

It's a simple text-based program, the interaction would work perfectly in a 
terminal with the computer printing out lines of text to the user, and the user 
typing in lines of text and pressing return, and this is the kind of 
interaction I want to enable on a web page.

Can anyone point me in the direction I should be looking, if I want to 
implement this kind of interaction over the net using python? I'm aware of CGI 
and HTML forms and the python modules for it, but I think that would require 
the entire page to be reloaded every time there's an input or output. So am I 
looking at ajax, javascript, etc.? I'm a little bit lost, not knowing what's 
available out there.

I'm looking for simplicity and ease of use for a python programmer.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor