CSSE1001 / MyPyTutor

Interactive tutorial application for Python3.
Other
7 stars 12 forks source link

OnlinePythonTutor - link Python3 visualisations #89

Closed pjritee closed 9 years ago

pjritee commented 9 years ago

For MPT visualization (and for visualizations in notes) we need OPT to default to Python3 - I guess that means we need to install Python3 on the zone. It also seems to default to Python2 at them moment but I don't see why.

EDIT(@jgat): The goal of this issue is now to ensure that links to the OPT from within MPT are sent to the Python 3 version. Discussion about other OPT issues at https://github.com/CSSE1001/csse1001-website/issues/20.

jgat commented 9 years ago

Looks like Python 3.3 was already on the zone (maybe I or someone else installed it some time in the past). I've symlinked the binaries so that python3 runs Python 3.3.0, and python2 runs Python 2.7.3. From what I can tell, Python 3.4 isn't available in the SmartOS package manager (though I don't believe that will affect our use case), if 3.4 is really needed, then ask ITIG for help.

In terms of getting the visualiser to run python 3, see if there's any documentation/example at http://www.pythontutor.com/.

ironstrider commented 9 years ago

I changed the default option on the OPT html page to 3.3 a while back.

jgat commented 9 years ago

Cool, but it doesn't work for me: http://csse1001.uqcloud.net/opt/visualize.html; click "visualise". I get a popup saying the server isn't configured to run python 3.

ironstrider commented 9 years ago

Yeah, I mean I literally changed the default option in the HTML page. If it doesn't work now, it would have never worked with python 3.

ironstrider commented 9 years ago

If it is anything like moss, the following may be helpful (instructions I wrote for installing my CSSE2310 test suite).

https://github.com/athleticus/pyra/blob/master/install-python-on-moss.md

pjritee commented 9 years ago

Does apache need to be configured to allow python3 cgi scripts?

pjritee commented 9 years ago

Using the URL: http://csse1001.uqcloud.net/opt/visualize.html#&py=3 seems to work

sapi commented 9 years ago

That could easily be prepended to the URL string we use in the app.

On Thursday, February 12, 2015, Peter Robinson notifications@github.com wrote:

Using the URL: http://csse1001.uqcloud.net/opt/visualize.html#&py=3 seems to work

— Reply to this email directly or view it on GitHub https://github.com/CSSE1001/MyPyTutor/issues/89#issuecomment-74002778.

pjritee commented 9 years ago

"not configured to run python 3" - the error message comes from js/iframe-embed.js (in /opt/local/share/httpd/htdocs/opt)

pjritee commented 9 years ago

Further to my previous comment - earlier in the file there are the lines var python2_backend_script = 'exec'; var python3_backend_script = null;

I not sure what null should be replaced with

ironstrider commented 9 years ago

This issue is probably more appropriately discussed over in https://github.com/CSSE1001/csse1001-website

ironstrider commented 9 years ago

Solved. It was in /opt/js/opt-frontend.js

jgat commented 9 years ago

I've just updated this issue to focus on the particular bug with MPT linking to the Python 2 visualisations of OPT.

I don't know if this particular issue has been resolved, so reopening until someone else confirms this.