You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
Importing certain classes or other objects from packages results in packages not found. E.g. os.path works just fine (from os import path), because build/src/os/path exists, but many packages (I came across math and collections) are implemented in a single Go file, so things like from math import pi or from collections import defaultdict will fail like this:
$ cat mth.py
from math import pi
print pi
$ ./build/bin/grumpc mth.py > mth.go
$ go run mth.go
mth.go:5:2: cannot find package "grumpy/lib/math/pi" in any of:
/usr/local/Cellar/go/1.7/libexec/src/grumpy/lib/math/pi (from $GOROOT)
/Users/ondrej/(...)/grumpy/build/src/grumpy/lib/math/pi (from $GOPATH)
Importing the package as a whole works just fine:
$ cat mth.py
import math
print math.pi
$ python2 mth.py
3.14159265359
$ ./build/bin/grumpc mth.py > mth.go
$ go run mth.go
3.141592653589793
Importing certain classes or other objects from packages results in packages not found. E.g.
os.pathworks just fine (from os import path), becausebuild/src/os/pathexists, but many packages (I came acrossmathandcollections) are implemented in a single Go file, so things likefrom math import piorfrom collections import defaultdictwill fail like this:Importing the package as a whole works just fine:
Maybe I'm missing something. I'm running b730a44.