trentm / go-tool

Automatically exported from code.google.com/p/go-tool
Other
10 stars 8 forks source link

Running python v3, then returning to v2, ruins the go install #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. I installed go for Python 2.6

2. Install Python 3.0

3. Install go for Python 3.0

4. Use go with Python 3.0 in the path

5. Get fed up with Python 3.0, move back to 2.6
as my default Python

6. Uses of 'go ....' now complain about Python 2.6-style
except statements (e.g. ... except TypeError, ex)

Workaround: uninstall go/2.6 and reinstall

Original issue reported on code.google.com by eric.pro...@gmail.com on 23 May 2009 at 12:37

GoogleCodeExporter commented 9 years ago
A related issue on Windows:

1. Install ActivePython 2.6
2. pypm install go
3. python26 -m go
4. Install ActivePython 2.7 (make it the 'default' Python)
5. Type "go" and it will complain:
C:\Users\sridharr\as\pypm\trunk>go tmp
C:\Python27\python.exe: No module named go

This is because, the `go.bat` script is using "python" instead of the full path 
python26.exe with which go was invoked (earlier) in first place. go should use 
sys.executable before writing "go.bat".

C:\Users\sridharr\as\pypm\trunk>more \python26\Scripts\go.bat
@echo off
rem Windows shell driver for 'go' (http://code.google.com/p/go-tool/).
set GO_SHELL_SCRIPT=%TEMP%\__tmp_go.bat
call python -m go %1 %2 %3 %4 %5 %6 %7 %8 %9
if exist %GO_SHELL_SCRIPT% call %GO_SHELL_SCRIPT%
set GO_SHELL_SCRIPT=

Original comment by Sridhar....@gmail.com on 31 May 2010 at 9:20

GoogleCodeExporter commented 9 years ago
This is possibly fixed here,
https://github.com/srid/go-tool/commit/625d2fcd35797b5e5f265b6ce2bd35d817ed072b

Original comment by Sridhar....@gmail.com on 27 Jul 2011 at 12:19