You are not logged in.

#1 2010-10-22 20:22:48

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Git question -- handling python vs python2 [SOLVED]

I'm working on a python project and trying to figure out how best to handle the #!/usr/bin/env python2 line. I do most of my development on my arch laptop/server, but also need it to run on a hosted server which is still on python 2.6. So I need one version to read '#!/usr/bin/env python2' and the other to read '#!/usr/bin/env python'. Otherwise, the code is the same.

Would this be a case to run parallel git branches...although as I'm thinking about I'm not sure how merging the two would work without overwriting what I'm trying to save? Or is there another obvious way to handle this? Hopefully I explained the issue clearly enough.

Thanks!
Scott

Last edited by firecat53 (2010-10-22 21:20:17)

Offline

#2 2010-10-22 20:29:52

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Git question -- handling python vs python2 [SOLVED]

On the server, add a /usr/bin/python2 symlink.

Offline

#3 2010-10-22 21:20:01

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Git question -- handling python vs python2 [SOLVED]

Ah, Doh! So easy. I have a ~/bin directory on the hosted server that I added to my $PATH, and created the python2 symlink to python in there. That does it.

Thanks!
Scott

Offline

Board footer

Powered by FluxBB