Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Interpreter" page
#1
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.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#2
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.
Recommended Tutorials:
Reply
#3
(Sep-15-2016, 01:58 PM)metulburr Wrote:
Quote:it doesn't print error messages.
Try it now.
Still no joy...
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#4
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.
Recommended Tutorials:
Reply
#5
(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...
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#6
It prints error messages for me, on Chrome.

name = 'ichabod'
name.sort()
print(name)
gives an attribute error on line 2.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#7
Quote:Still no show for me...



What browser are you using during this?
Recommended Tutorials:
Reply
#8
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
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#9
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?
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#10
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/
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020