On Sat, 25 Jan 2014 19:10:49 -0700, Joseph <syscon...@gmail.com> wrote:
> On 01/25/14 14:21, David Abbott wrote:
> >On Sat, Jan 25, 2014 at 1:15 PM, Joseph <syscon...@gmail.com> wrote:
> >>  File "./cdnpayroll.py", line 1328
> >>       ^
> >> SyntaxError: EOF while scanning triple-quoted string literal
> >
> >Try changing the shebang from:to
> >#!/usr/bin/python  /#!/usr/bin/python2
> 
> Thanks David, that was it. It should be /#!/usr/bin/python2
> 

Alternatively, you can make the /usr/bin/python symlink point to a
python2 implementation with eg.
    eselect python set python2.7

I do this on most of my systems, since there are still a lot of old
python scripts, that used to be valid in every way until python3 came
around, that assume 'python' is compatible with python2. Several
packages in Gentoo still have build failures due to this, although their
numbers are dwindling.

Also, scripts written for python3 that are incompatible with earlier
implementations should (IMO) be expected to declare a more specific
shebang.


PS: for completeness' sake, the /usr/bin/python2 and ...3 symlinks
can be changed with the --python2 and --python3 arguments after 'set'
in the eselect command. Available implementations can be listed with
    eselect python list
which also optionally takes the --python2 and --python3 arguments.

-- 
eroen

Attachment: signature.asc
Description: PGP signature

Reply via email to