Skip to content

Commit

Permalink
Allow "Python 3.6 + Anaconda 5.2 EXPERIMENTAL!" mode of PythonTutor
Browse files Browse the repository at this point in the history
This should fix kikocorreoso#10!

It was very easy!
  • Loading branch information
Naereen authored Feb 21, 2021
1 parent 123add6 commit 2b2616f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tutormagic.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def tutor(self, line, cell=None, local_ns=None):
args = parse_argstring(self.tutor, line)

if args.lang:
if args.lang[0].lower() in ['python2', 'python3',
if args.lang[0].lower() in ['python2', 'python3',
'py3anaconda',
'java',
'javascript',
'typescript',
Expand All @@ -148,7 +149,7 @@ def tutor(self, line, cell=None, local_ns=None):
else:
raise ValueError(
"{} not supported. Only the following options are allowed: "
"'python2', 'python3', 'java', 'javascript', "
"'python2', 'python3', 'py3anaconda', 'java', 'javascript', "
"'typescript', 'ruby', 'c', 'c++'".format(args.lang[0]))
else:
lang = "python3"
Expand All @@ -175,6 +176,8 @@ def tutor(self, line, cell=None, local_ns=None):
url += "py=3"
elif lang == "python2":
url += "py=2"
elif lang == "py3anaconda":
url += "py=py3anaconda"
elif lang == "java":
url += "py=java"
elif lang == "javascript":
Expand Down

0 comments on commit 2b2616f

Please sign in to comment.