3 ms·
I tried a simple `http.Get()` example, but the resultant `Response` object appears to not allow access to any of the struct fields as attributes. How does one a
by weberc2 10y ago
I tried a simple `http.Get()` example, but the resultant `Response` object appears to not allow access to any of the struct fields as attributes. How does one access a Go object's fields from Python? For example, I want to `io.Copy(os.Stdout, rsp.Body)`.
- trotterdylan 10y agoUnfortunately the native interface is still pretty immature so I can't guarantee things will work as they should. In this case, I think the problem is that you have a *Response object which is not itself a struct. I've rewritten this part of the code a couple times and I think this functionality was lost. I've filed: https://github.com/google/grumpy/issues/13 https://github.com/google/grumpy/issues/13
- trotterdylan 10y agoWhoops, just noticed you (or somebody) had already filed it: https://github.com/google/grumpy/issues/12 https://github.com/google/grumpy/issues/12
- weberc2 10y agoYeah, that was me. I should have updated my post here accordingly. Apologies for the inconvenience!
- trotterdylan 10y agoIt's all good. Thanks for filing the issue. I'll get that fixed.