Re: Try Python!

2006-03-30 Thread Cyril Bazin
Now, you can try "laszlo in 10 minutes" http://www.laszlosystems.com/lps/laszlo-in-ten-minutes/ . Reference: http://www.openlaszlo.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python!

2006-03-30 Thread bruno at modulix
Michael Tobis wrote: > We had some discussion of this in the edu-sig meeting at PyCon. > > I alleged that I had read that there is no such thing as a Python > sandbox. And yet Zope 2 has some restricted environment for TTW scripts... -- bruno desthuilliers python -c "print '@'.join(['.'.join([

Re: Try Python!

2006-03-29 Thread Ben Finney
"Michael Tobis" <[EMAIL PROTECTED]> writes: > So what is the scoop? Why does Guido say there is no such thing as a > secure Python, and (as is generally reasonable) presuming he is correct > on the matter, how can these sites work safely? "Security is a process, not a product." There's no such

Re: Try Python!

2006-03-29 Thread Serge Orlov
Michael Tobis wrote: > We had some discussion of this in the edu-sig meeting at PyCon. > > I alleged that I had read that there is no such thing as a Python > sandbox. Others claimed that one could simply preprocess and disallow > "dangerous" constructs. My allegation was based on an argument from

Re: Try Python!

2006-03-29 Thread Armin Ronacher
BartlebyScrivener wrote: > Armin, > > Mike Meyer already took a crack at this, and his starts right up just > by clicking on the link. > > http://www.mired.org/home/mwm/try_python/ Hm. Looks not that useful since you can't create any functions and you can remove the prompt :-) > Yours looks pretti

Re: Try Python!

2006-03-29 Thread Terry Reedy
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > I refer you in particular to these messages from BDFL: > > http://mail.python.org/pipermail/python-dev/2002-December/031246.html This one says that new style classes in 2.2 opened a new, sizable, security hole. O

Re: Try Python!

2006-03-29 Thread Paul Rubin
"Michael Tobis" <[EMAIL PROTECTED]> writes: > So what is the scoop? Why does Guido say there is no such thing as a > secure Python, and (as is generally reasonable) presuming he is correct > on the matter, how can these sites work safely? One way is to run the Python interpreter itself in a sandb

Re: Try Python!

2006-03-29 Thread Michael Tobis
We had some discussion of this in the edu-sig meeting at PyCon. I alleged that I had read that there is no such thing as a Python sandbox. Others claimed that one could simply preprocess and disallow "dangerous" constructs. My allegation was based on an argument from authority; I recalled reading

Re: Try Python!

2006-03-29 Thread BartlebyScrivener
Armin, Mike Meyer already took a crack at this, and his starts right up just by clicking on the link. http://www.mired.org/home/mwm/try_python/ Yours looks prettier, but I don't think novices are going to be able to figure out how to start it. Regards, rick -- http://mail.python.org/mailman/

Try Python!

2006-03-29 Thread Armin Ronacher
Hiho, One week ago I came across the nice `Try Ruby!`_ demonstration which features an ajax based ruby console and a 20 minutes ruby tutorial. I really liked that application and so I started to port that to python. Since I got a bit confused by the very complex javascript code I wrote a webconsol

(Different) Try Python Update

2006-01-14 Thread Devan L
mply binds the name to the first one, which is a very bad thing! So if you can find anything related to this in the source, send me an email. Oh, right, and in case you have no clue what I'm talking about, I'm trying to replicate an interactive session online. My Try Python is a

Re: Try Python update

2006-01-08 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Meanwhile, other JS/DOM experts have told me that there's NO way to set > cursor position within a textarea according to w3c standards. In this > case, what your site does now may be the "least bad" approach, and that > fact might be noted in the "browse

Re: Try Python update

2006-01-08 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > I'm finding it hard to arrange my own experiments with Safari (I'm using > > a loaner machine since my normal one[s] are all having problems and > > under repair) but I'm told the solution for cursor positioning

Re: Try Python update

2006-01-08 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > I'm finding it hard to arrange my own experiments with Safari (I'm using > a loaner machine since my normal one[s] are all having problems and > under repair) but I'm told the solution for cursor positioning is to set > the caretPos attribute of the texta

Re: Try Python update

2006-01-08 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > Mike Meyer <[EMAIL PROTECTED]> wrote: > > For some reason, I couldn't see the links at the end of the page; now I > > can, though they look sort of "ragged", but, OK. > > Probably the fonts I chose. I'm in no wa

Re: Try Python update

2006-01-08 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: > For some reason, I couldn't see the links at the end of the page; now I > can, though they look sort of "ragged", but, OK. Probably the fonts I chose. I'm in no way a good visual designer. I'm hoping someone who is

Re: Try Python update

2006-01-07 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > "Known problems" doesn't have URL (isn't "urlable"?) other than > http://www.mird.org/home/mwm/try_python/. It's on that page - click on s/mird/mired/ -- the URL as given goes to some 'oxide' thing. > "Known Problems" to open up the section. That par

Re: Try Python update

2006-01-07 Thread Mike Meyer
e's Safari browser (not in Firefox), but I don't want to add > a bug report if you already know about it -- 'Try Python' is a neat > hack, and useful, it well deserves some care from would-be bug > reporters... but I can't see any links to "known problems"

Re: Try Python update

2006-01-07 Thread Alex Martelli
want to add a bug report if you already know about it -- 'Try Python' is a neat hack, and useful, it well deserves some care from would-be bug reporters... but I can't see any links to "known problems" (or other bug-reporting facilities) from the base page. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python update

2006-01-07 Thread Devan L
Mike Meyer wrote: > Xavier Morel <[EMAIL PROTECTED]> writes: [Old message and Xavier's question] [Mike's reply to Xavier] > > > Since Python doesn't have any way to secure the interface built-in, > > i'd be interrested in that. > > Devan apparently doesn't have as cooperative an ISP, and is working

Re: Try Python update

2006-01-06 Thread Mike Meyer
Xavier Morel <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> The url is http://www.mired.org/home/mwm/try_python/. Reports of >> problems would appreciated. >> If you want to try an online P{ython tool that lets you save code, >> try >> Devan L's at http://www.datamech.com/devan/trypython/trypyt

Re: Try Python update

2006-01-06 Thread Xavier Morel
Mike Meyer wrote: > After spending time I should have been sleeping working on it, the try > python site is much more functional. It now allows statements, > including multi-line statements and expressions. You can't create code > objects yet, so it's still more a progra

Re: Try Python update

2006-01-05 Thread Mike Meyer
Steven Bethard <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> The url is http://www.mired.org/home/mwm/try_python/. Reports of >> problems would appreciated. > You're probably already aware of this, but the online help utility > doesn't work. It exits before you can type anything into it: Act

Re: Try Python update

2006-01-05 Thread Steven Bethard
Mike Meyer wrote: > The url is http://www.mired.org/home/mwm/try_python/. Reports of > problems would appreciated. You're probably already aware of this, but the online help utility doesn't work. It exits before you can type anything into it:

Re: Try Python update

2006-01-04 Thread Mike Meyer
"Szabolcs Nagy" <[EMAIL PROTECTED]> writes: > Hello > Thanks for trypython, it's a cool idea Thank you. > I got TryPythonError after an IdentationError and i could not get rid > of it (other than refreshing the page): > > Python 2.4.2 (#3, Dec 16 2005, 23:54:20) > [GCC 2.95.4 20020320 [FreeBSD]]

Re: Try Python update

2006-01-04 Thread Szabolcs Nagy
Hello Thanks for trypython, it's a cool idea I got TryPythonError after an IdentationError and i could not get rid of it (other than refreshing the page): Python 2.4.2 (#3, Dec 16 2005, 23:54:20) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits", or "license" for mor

Re: Try Python update

2006-01-04 Thread Mike Meyer
"Bas" <[EMAIL PROTECTED]> writes: > You could somehow combine the official tuturial (or any other good > introductory text) and make all the examples in the text 'live'. Maybe > use a split screen with the tutorial text on one side and the trypython > console on the other. The newbie could then imm

Re: Try Python update

2006-01-04 Thread Bas
To expand on this idea: You could somehow combine the official tuturial (or any other good introductory text) and make all the examples in the text 'live'. Maybe use a split screen with the tutorial text on one side and the trypython console on the other. The newbie could then immediately try the

Re: Try Python update

2006-01-04 Thread [EMAIL PROTECTED]
> I think that the code constructor (types.CodeType) doesn't take > co_freevars or co_cellvars as an arg, so I can't directly create a new > code object from the attribute of the old one with co_freevars and > co_cellvars. Yay for hidden documentation: "code(argcount, nlocals, stacksize, flags, c

Re: Try Python update

2006-01-03 Thread Devan L
Mike Meyer wrote: > [EMAIL PROTECTED] writes: [comments about Mike Meyer's try python, I think] > > I had no trouble with from math import * followed by print pi, but > > there was no >>> prompt after the result appeared .. is that part of > > the 'closure

Re: Try Python update

2006-01-03 Thread Devan L
[EMAIL PROTECTED] wrote: > I like the form, no matter what its limitations may be. Three notes: > > It might be a good way to catch newbi mistakes (those are the kind I > make :P, thereby providing a feedback loop to improved error messages. > > I had no trouble with from math import * followed b

Re: Try Python update

2006-01-03 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I like the form, no matter what its limitations may be. Three notes: > > It might be a good way to catch newbi mistakes (those are the kind I > make :P, thereby providing a feedback loop to improved error messages. I'm doing almost no error catching. I think I catch two

Re: Try Python update

2006-01-03 Thread browerg
I like the form, no matter what its limitations may be. Three notes: It might be a good way to catch newbi mistakes (those are the kind I make :P, thereby providing a feedback loop to improved error messages. I had no trouble with from math import * followed by print pi, but there was no >>> pro

Re: Try Python update

2006-01-03 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Very nice :) > > I found this online Ruby tutorial: > http://tryruby.hobix.com/ That's what inspired me to create my version. > I think it would be cool to have something similar for Python. Want to > go further and make a nice tutorial to accom

Re: Try Python update

2006-01-03 Thread [EMAIL PROTECTED]
Very nice :) I found this online Ruby tutorial: http://tryruby.hobix.com/ I think it would be cool to have something similar for Python. Want to go further and make a nice tutorial to accompany this :) wy -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python update

2006-01-01 Thread Mike Meyer
"Devan L" <[EMAIL PROTECTED]> writes: >> > On a side note, my brother has tinkered with the C internals and now >> > __subclasses__ is restricted and many, many os and posix commands are >> > restricted (not that you can get them anyways, since importing is >> > broken!) >> I got import to work by

Re: Try Python update

2006-01-01 Thread Devan L
Mike Meyer wrote: > "Devan L" <[EMAIL PROTECTED]> writes: > >> If you want to try an online P{ython tool that lets you save code, try > >> Devan L's at http://www.datamech.com/devan/trypython/trypython.py. > > My code uses one of the recipes from the Python Cookbook, 7.6 Pickling > > Code Objects.

Re: Try Python update

2006-01-01 Thread Mike Meyer
"Devan L" <[EMAIL PROTECTED]> writes: >> If you want to try an online P{ython tool that lets you save code, try >> Devan L's at http://www.datamech.com/devan/trypython/trypython.py. > My code uses one of the recipes from the Python Cookbook, 7.6 Pickling > Code Objects. It's limited to closures tho

Re: Try Python update

2006-01-01 Thread Devan L
Mike Meyer wrote: > After spending time I should have been sleeping working on it, the try > python site is much more functional. It now allows statements, > including multi-line statements and expressions. You can't create code > objects yet, so it's still more a progra

Re: Try Python update

2006-01-01 Thread UrsusMaximus
Cool. I think its really a good thing. Could come in handy when one is on a strange Windows machine with no Python installed, or when using a PDA that doesn't have Python etc. And its just a neat feat. ;-))) Ron -- http://mail.python.org/mailman/listinfo/python-list

Try Python update

2006-01-01 Thread Mike Meyer
After spending time I should have been sleeping working on it, the try python site is much more functional. It now allows statements, including multi-line statements and expressions. You can't create code objects yet, so it's still more a programmable calculator than anything real. I&#

Re: ANN: (Different) Try Python Beta

2005-12-28 Thread Mike Meyer
"Devan L" <[EMAIL PROTECTED]> writes: > I've spent a while putting together a partially working Try Python > which handles class and function definitions. It also (used to) work > with imports, but my hacked version of jelly doesn't work with it > anymore,

Re: ANN: (Different) Try Python Beta

2005-12-28 Thread Devan L
Steve Holden wrote: > Devan L wrote: [what I said] > At first I thought 'the cgitb TypeError message from "import os" is > impressively drastic :-)'. Then I realised in a later session that > "import os" only gave an error message after I'd run "import this". > Thereafter, unfortunately, almost an

Re: ANN: (Different) Try Python Beta

2005-12-28 Thread Steve Holden
Devan L wrote: > I've spent a while putting together a partially working Try Python > which handles class and function definitions. It also (used to) work > with imports, but my hacked version of jelly doesn't work with it > anymore, so only import this works as far as I kn

ANN: (Different) Try Python Beta

2005-12-28 Thread Devan L
I've spent a while putting together a partially working Try Python which handles class and function definitions. It also (used to) work with imports, but my hacked version of jelly doesn't work with it anymore, so only import this works as far as I know. It won't play nice if you

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Mike Meyer
Eric <[EMAIL PROTECTED]> writes: > I'm not sure about everyone else, but I find the big warnings about > CSS and JavaScript almost as annoying as the fact that it doesn't do > anything. At all, even with JavaScript enabled. Then again, my main > browser is elinks, so my opinion is somewhat biased

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Mike Meyer
"Maravilloso" <[EMAIL PROTECTED]> writes: > I'm afraid that I've spoiled the "try_python" working by means of > executing the sentence: > > open("try.py").write("\n") > > Sorry. I hope it don't be difficult for you to restore the module again > to the default folder. No problem - I'm not crazy eno

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Maravilloso
I'm afraid that I've spoiled the "try_python" working by means of executing the sentence: open("try.py").write("\n") Sorry. I hope it don't be difficult for you to restore the module again to the default folder. In any case, I think it should include some control for malicious code like that one

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Eric
On 20 December 2005, Mike Meyer wrote: > Ok, I've given it the interface I want, and made it less of an > attractive nuisance. > > http://www.mired.org/home/mwm/try_python/ is now ready for people to > play with. There's no tutorial information on it yet, that's the next > thing to do. However, I w

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Mike Meyer
Richie Hindle <[EMAIL PROTECTED]> writes: >> My assumption is that if splitting on '\n' leaves us with one >> thing, we may have gotten a string that used \r for newlines > Ah, OK. Your comment talks about DOS - that won't happen on DOS (or > Windows) which uses \r\n. I don't know about the Mac.

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Richie Hindle
[Richie] > I think it's your JavaScript '\r' processing that's broken. Certainly the > error ("unexpected EOF while parsing") is consistent with having a \r on the > end of the expression. [Mike] > Python doesn't care about the trailing newline. That's a carriage return, not a newline: >>> eva

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Mike Meyer
Richie Hindle <[EMAIL PROTECTED]> writes: >> Yeah, I know. I poked at it briefly, but couldn't figure out what was >> goiing on. MSIE on the Mac doesn't work at all (no AJAT), and I don't >> have regular access to a Windows box to try it on. > > I think it's your JavaScript '\r' processing that's b

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Paul Boddie
Mike Meyer wrote: [Browser behaviour] > Actually, it's doing form processing. It's doing XMLHttpRequests. You might want to add some workarounds for Konqueror. What I found was that Konqueror (on KDE 3.4.0) has a tendency to add null bytes to the end of some form field values. Consequently, I ge

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Richie Hindle
[Claudio] > The page doesn't work for me in MSIE (I am on a Windows system) [Mike] > Yeah, I know. I poked at it briefly, but couldn't figure out what was > goiing on. MSIE on the Mac doesn't work at all (no AJAT), and I don't > have regular access to a Windows box to try it on. I think it's you

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Kay Schluehr
Mike Meyer wrote: > Ok, I've given it the interface I want, and made it less of an > attractive nuisance. > > http://www.mired.org/home/mwm/try_python/ is now ready for people to > play with. There's no tutorial information on it yet, that's the next > thing to do. However, I won't be able to work

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Mike Meyer
[EMAIL PROTECTED] writes: > >> It does work for me in FireFox and Netscape: > >> >>> 1+1 > >> 2 > Mike> Also Safari, Mozilla and Netscape. > I tried 4+3 in Safari and got I've been futzing with it all evening. Various things I've done have broken it in strange ways. It's working n

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Mike Meyer
"David Wahler" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> The previous version was in a jail, which is why I didn't want it >> generally announced. The logs made amusing reading. I like Gerhard's >> idea of removing __import__, and have done that. > Oh, you have, eh? Are you absolutely sur

Re: ANNOUNCE; Try python beta

2005-12-19 Thread David Wahler
Mike Meyer wrote: > The previous version was in a jail, which is why I didn't want it > generally announced. The logs made amusing reading. I like Gerhard's > idea of removing __import__, and have done that. Oh, you have, eh? Are you absolutely sure? Try running "grep 'all your base' log". -- Dav

Re: ANNOUNCE; Try python beta

2005-12-19 Thread skip
>> It does work for me in FireFox and Netscape: >> >>> 1+1 >> 2 Mike> Also Safari, Mozilla and Netscape. I tried 4+3 in Safari and got 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Mike Meyer
Claudio Grondi <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Ok, I've given it the interface I want, and made it less of an >> attractive nuisance. >> http://www.mired.org/home/mwm/try_python/ is now ready for people to >> play with. There's no tutorial information on it yet, that's the next >

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Mike Meyer
"Lonnie Princehouse" <[EMAIL PROTECTED]> writes: > Pretty neat =) > But aren't you concerned about security? Letting anybody execute > arbitrary Python expressions (and therefore also arbitrary system > commands?!) on your box --- even from within a FreeBSD jail --- seems a > bit dangerous. What'

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Devan L
Mike Meyer wrote: > Ok, I've given it the interface I want, and made it less of an > attractive nuisance. > > http://www.mired.org/home/mwm/try_python/ is now ready for people to > play with. There's no tutorial information on it yet, that's the next > thing to do. However, I won't be able to work

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Gerhard Häring
Lonnie Princehouse wrote: > Pretty neat =) > > But aren't you concerned about security? Letting anybody execute > arbitrary Python expressions (and therefore also arbitrary system > commands?!) on your box --- even from within a FreeBSD jail --- seems a > bit dangerous. I found out about the Fre

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Claudio Grondi
Mike Meyer wrote: > Ok, I've given it the interface I want, and made it less of an > attractive nuisance. > > http://www.mired.org/home/mwm/try_python/ is now ready for people to > play with. There's no tutorial information on it yet, that's the next > thing to do. However, I won't be able to work

Re: ANNOUNCE; Try python beta

2005-12-19 Thread Lonnie Princehouse
Pretty neat =) But aren't you concerned about security? Letting anybody execute arbitrary Python expressions (and therefore also arbitrary system commands?!) on your box --- even from within a FreeBSD jail --- seems a bit dangerous. -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE; Try python beta

2005-12-19 Thread Mike Meyer
Ok, I've given it the interface I want, and made it less of an attractive nuisance. http://www.mired.org/home/mwm/try_python/ is now ready for people to play with. There's no tutorial information on it yet, that's the next thing to do. However, I won't be able to work on it for a while, so if you