Python Forum
"Interpreter" page - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Board (https://python-forum.io/forum-26.html)
+--- Thread: "Interpreter" page (/thread-42.html)

Pages: 1 2


"Interpreter" page - Ofnuts - Sep-15-2016

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.


RE: "Interpreter" page - metulburr - Sep-15-2016

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.


RE: "Interpreter" page - Ofnuts - Sep-15-2016

(Sep-15-2016, 01:58 PM)metulburr Wrote:
Quote:it doesn't print error messages.
Try it now.
Still no joy...


RE: "Interpreter" page - metulburr - Sep-15-2016

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.


RE: "Interpreter" page - Ofnuts - Sep-15-2016

(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...


RE: "Interpreter" page - ichabod801 - Sep-15-2016

It prints error messages for me, on Chrome.

name = 'ichabod'
name.sort()
print(name)
gives an attribute error on line 2.


RE: "Interpreter" page - metulburr - Sep-15-2016

Quote:Still no show for me...



What browser are you using during this?


RE: "Interpreter" page - sparkz_alot - Sep-15-2016

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



RE: "Interpreter" page - Ofnuts - Sep-15-2016

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?


RE: "Interpreter" page - metulburr - Sep-16-2016

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/