I meant to say you get those errors when you try to use python 3 with the scripts you download from the link on the lesson page: http://swcarpentry.github.io/make-novice/make-lesson.tar.gz
On Thu, Nov 12, 2015 at 9:29 PM, Tiffany Timbers <[email protected]> wrote: > You get the following errors with python 2 if you follow the instructions > on the lesson webpage: > > $ python wordcount.py books/isles.txt isles.dat > > File "wordcount.py", line 79 > > return sorted(counts.iteritems(), key=lambda (key,value): value, \ > > ^ > > SyntaxError: invalid syntax > > and > > $ python plotcount.py isles.dat show > > Traceback (most recent call last): > > File "plotcount.py", line 8, in <module> > > from wordcount import load_word_counts > > File "/Users/tiffanytimbers/Desktop/make-lesson/wordcount.py", line 79 > > return sorted(counts.iteritems(), key=lambda (key,value): value, \ > > ^ > > SyntaxError: invalid syntax > > These go away when you convert the scripts to python 3 with 2to3. Looking > in the repo, I see that there are updated copies of these scripts in the > code directory where they have been converted to python 3, but this was not > obvious and is not clearly documented anywhere. > > Cheers, > Tiffany > > On Thu, Nov 12, 2015 at 9:16 PM, W. Trevor King <[email protected]> wrote: > >> On Thu, Nov 12, 2015 at 08:23:57PM -0800, Tiffany Timbers wrote: >> > I am teaching Make tomorrow to a class who has been learning Python >> > 3 and (I think) I have just discovered that the current Make lesson >> > depends on Python 2.7 not Python 3. Just wanted to give a heads up >> > to anyone else planning on using the lesson. >> >> Is it? This commit [1] looks like it was working towards code >> compatible with both Python 2 and 3, and it would be strange to stop >> work like that halfway through. What problems were you seeing with >> Python 3? >> >> Cheers, >> Trevor >> >> [1]: >> https://github.com/swcarpentry/make-novice/commit/1cdb5f72744e2a8e6d1c72631789ab2ac6c999eb >> >> -- >> This email may be signed or encrypted with GnuPG (http://www.gnupg.org). >> For more information, see >> http://en.wikipedia.org/wiki/Pretty_Good_Privacy >> > > > > -- > Tiffany A. Timbers, PhD > Banting Postdoctoral fellow, Leroux Lab > Department of Molecular Biology and Biochemistry > Simon Fraser University > 8888 University Drive > Burnaby, BC, V5A 1S6 > > 604-803-4962 > > [email protected] > tiffanytimbers.com > @TiffanyTimbers > -- Tiffany A. Timbers, PhD Banting Postdoctoral fellow, Leroux Lab Department of Molecular Biology and Biochemistry Simon Fraser University 8888 University Drive Burnaby, BC, V5A 1S6 604-803-4962 [email protected] tiffanytimbers.com @TiffanyTimbers
_______________________________________________ Discuss mailing list [email protected] http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org
