Python Forum

Full Version: "Interpreter" page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is http://python-forum.io/misc.php?page=interpreter

Nice thing to have but it its present form it seems hard to use since it doesn't print error messages.

I tried to see if it were a security liability but at least glob and os are not available and most things in sys don't work.
Quote:it doesn't print error messages.
Try it now.

Quote:I tried to see if it were a security liability but at least glob and os are not available and most things in sys don't work.
Yes, you wont have access to everything.
(Sep-15-2016, 01:58 PM)metulburr Wrote: [ -> ]
Quote:it doesn't print error messages.
Try it now.
Still no joy...
I removed the alert and added the error in the output.

I also moved this thread to suggestions because i want to hear from regular users on their perspective of this.
(Sep-15-2016, 03:16 PM)metulburr Wrote: [ -> ]I removed the alert and added the error in the output.

I also moved this thread to suggestions because i want to hear from regular users on their perspective of this.

Still no show for me...
It prints error messages for me, on Chrome.

name = 'ichabod'
name.sort()
print(name)
gives an attribute error on line 2.
Quote:Still no show for me...



What browser are you using during this?
Just ran the sample code you supplied:
name = 'ichabod'
 name.sort()
 print(name)
and received:
ParseError: bad input on line 2
using IE 11

Just tried again with Chrome and got:
AttributeError: 'str' object has no attribute 'sort' on line 2
OK, so I tried on chromium and it worked (btw, I could use it as guest... could be dangerous). Noticed  ther was an iframe, so loaded the iframe page. That worked. Back to FF, load only the iframe. It works. Try the whole page again and this time it works. Restart FF, still works. So the case is closed:)

Is there a way to have a URL that would be a link to the interpreter page, ready to run arbitrary code?
I restricted the interpreter to members only. But it cannot be abused. Its not like its an interpreter that is just output to the page, and controlling directly. Its parsing the input/output via regex, thus the reason you will sometimes get a parse error instead of a regular syntax error. It is 
http://www.skulpt.org/
Pages: 1 2