[petsc-dev] #!/usr/bin/env python2?

Jed Brown jed at 59A2.org
Tue Oct 19 06:33:39 CDT 2010

My distro is progressive and now

$ ls -l `which python`
lrwxrwxrwx 1 root root 7 Oct  4 14:45 /usr/bin/python -> python3

Since PETSc's use of Python does not work with python3, I think it makes
sense to put

#!/usr/bin/env python2

in all the python files.  Is there any reason not to do this?


PS: I've heard of projects supporting both python2 and python3 within the
same codebase.  Are they just programming in py2 and running 2to3 to
generate a version that builds with py3?  There seem to be enough library
and language differences that truly having one code that works with both
would be a lot of work.  A lot of 2to3 changes are still valid py2.6, but
not at all with py2.3.  Is anyone who supports py2.4 or py2.3 also
supporting py3 from the same codebase?  How?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101019/ceee0869/attachment.html>

More information about the petsc-dev mailing list