How to make codelens/activecode use python 3.6 by default?

23 views
Skip to first unread message

Victor Norman

unread,
May 18, 2018, 9:28:10 PM5/18/18
to RunestoneInteractive
I'm beginning a project where I write a bunch of exercises in python for my students to use for extra practice.

I've created a few exercises and things are going well.  But, for each question, when I click on the CodeLens button, it shows that it is using python 2.7.

Is there some directive that I can put somewhere that tells codelens to use python 3.6 instead?

Sorry if this has been asked before.  Couldn't find an answer...

Thanks.

Vic

Brad Miller

unread,
May 19, 2018, 12:01:06 PM5/19/18
to runestonei...@googlegroups.com
Vic,

This is currently a limitation of our implementation of the run in Codelens features.  There was a group of students from GT that were going to update our integration to use the latest version of PythonTutor and give us the ability to specify Python 2 versus 3 but that was last fall, so I'm assuming that is not going to happen now.

Upgrading would also let us use run in codelens for java, javascript or c++ so its definitely a worthy project...

If someone wanted to pick this up as a project that would be awesome.  If not I'll add it to my list.

Brad

--
You received this message because you are subscribed to the Google Groups "RunestoneInteractive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Norman

unread,
May 20, 2018, 6:30:47 PM5/20/18
to RunestoneInteractive
Brad,

Thanks for your respnose.  But, how is it that when you click on CodeLens on a page like this, it uses python 3.6?  There must be something different...
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinteractive+unsub...@googlegroups.com.

Brad Miller

unread,
May 21, 2018, 3:56:35 PM5/21/18
to runestonei...@googlegroups.com
Vic,

So there is more going on here than my quick response took into consideration.

1.  Interactivepython.org was deprecated last summer.   I haven't updated the code over there for a while.  Nevertheless I see the same behavior you point out on https://runestone.academy

2. There are two different modes of operation for CodeLens.  The canned examples and the Show in CodeLens button.  The canned examples are stuck in python2 until I (or someone) does a bit of work to update that integration.  The show in Codelens button uses the live PythonTutor inside an I frame, and uses the variable you set for your course.  (The Use python 3 checkbox).  OR If you are building from source yourself its a variable you set in the pavement.py file.  My suspicion is that you haven't set up your course to use Python3.  

And you really should move over to runestone.academy.

Brad


To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RunestoneInteractive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.

Victor Norman

unread,
May 21, 2018, 4:43:14 PM5/21/18
to runestonei...@googlegroups.com
Brad,

Thanks.  Right now I'm just experimenting with building a page or two containing some simple problems in python. 

If all goes to plan, I hope to just build this up and up, so that the pages contain hundreds of little practice problems students can use.

So, it will never be a "course" per se.  I don't plan to assign problems from these pages -- I just am using runestone's stuff to develop this tool.


Vic


To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinteractive+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RunestoneInteractive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinteractive+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "RunestoneInteractive" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/runestoneinteractive/_nHuzS_y94E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to runestoneinteractive+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
“A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.” -- Antoine de Saint Exupéry

Brad Miller

unread,
May 21, 2018, 6:05:53 PM5/21/18
to runestonei...@googlegroups.com
Vic,

OK, cool!   Make sure you edit the template_args section of your pavement.py file.  You should have a line that looks like 'python3': 'true', to get the show in codelens button to use python3.6.

If that is already the case and you are still not getting python3 let me know as that sounds like a bug.

Brad

To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RunestoneInteractive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "RunestoneInteractive" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/runestoneinteractive/_nHuzS_y94E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to runestoneinterac...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
“A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.” -- Antoine de Saint Exupéry

--
You received this message because you are subscribed to the Google Groups "RunestoneInteractive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runestoneinterac...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages