Re: [Cloud] Python gives "invalid syntax" error only on labs

2018-08-19 Thread Huji Lee
Fair enough. I should have switched to python 3 for my local environment a long while ago anyway, and this gives me one more reason to do so. Thank you both! Huji On Sun, Aug 19, 2018 at 6:07 PM Guilherme Gonçalves < guilherme.p.g...@gmail.com> wrote: > Hi Huji, > > It does look like the differen

Re: [Cloud] Python gives "invalid syntax" error only on labs

2018-08-19 Thread Guilherme Gonçalves
Hi Huji, It does look like the difference in Python versions is the problem. The Python 3 docs say: Both string and bytes literals may optionally be prefixed with a letter 'r' > or 'R'; such strings are called *raw strings* and treat bac

Re: [Cloud] Python gives "invalid syntax" error only on labs

2018-08-19 Thread Huji Lee
Excellent question. On my own computer, I am using 2.7.12 but on labs it is 3.4.3 Of note, when I changed my code such that all cases of *ur'...'* now read *u'...' *the script worked in both environments. So it has to do with how escaping works in python, I guess. But I am not sure. On Sun, Aug 1

Re: [Cloud] Python gives "invalid syntax" error only on labs

2018-08-19 Thread Alex Monk
What are the versions of Python involved? On Sun, 19 Aug 2018 at 21:34, Huji Lee wrote: > Hello, > > When I run this script[1] on my own machine it runs without any problem. > When I run it on Labs, I get an invalid syntax error, pasted below. Can you > please help me figure out why? > > Thanks!

[Cloud] Python gives "invalid syntax" error only on labs

2018-08-19 Thread Huji Lee
Hello, When I run this script[1] on my own machine it runs without any problem. When I run it on Labs, I get an invalid syntax error, pasted below. Can you please help me figure out why? Thanks! (venv)tools.huji@tools-bastion-03:~$ python core/pwb.py webcite -page:"SOME PAGE" Traceback (most rec