[go-nuts] Re: Calling Go from Python

2021-04-07 Thread Amit Lavon
Thanks!
Gopy seemed promising back when I started exploring this topic, but I had 
some issues getting it to work, especially on Windows. It may have gotten 
better by now. Anyway I agree it's beneficial to have both approaches 
available so I am happy to see gopy grow as well.
On Wednesday, April 7, 2021 at 8:10:03 AM UTC+3 Justin Israel wrote:

> On Wednesday, April 7, 2021 at 6:10:49 AM UTC+12 amitl...@gmail.com wrote:
>
>>
>> Hi,
>> A cheat-sheet I wrote for myself evolved into a full tutorial 
>>  on calling Go directly from Python 
>> using ctypes and dll's, so I am happy to share it with the community. It 
>> starts from the very basics and covers how to handle arrays, strings and 
>> objects in both directions, memory management, performance, and even how to 
>> interact directly with numpy and pandas objects. I hope it's useful for the 
>> pythonistas among you.
>>
>> Any feedback, ideas and questions are welcome.
>>
>
> Nice write up! I've use the ctypes approach for a few situations and its 
> great to have a detailed reference guide like this. 
>
> Also recently I started using https://github.com/go-python/gopy and have 
> been contributing a bunch of fixes and features. For simple situations 
> though it is much easier to just use the ctypes approach since you have 
> fine grained control over the access. As long has you don't have too much 
> to expose to python, and too much memory management and type shimming to do.
>  
>
>>
>> Amit
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9621c43b-720e-40f8-9ea3-74366032e66cn%40googlegroups.com.


[go-nuts] Re: Calling Go from Python

2021-04-06 Thread Justin Israel


On Wednesday, April 7, 2021 at 6:10:49 AM UTC+12 amitl...@gmail.com wrote:

>
> Hi,
> A cheat-sheet I wrote for myself evolved into a full tutorial 
>  on calling Go directly from Python 
> using ctypes and dll's, so I am happy to share it with the community. It 
> starts from the very basics and covers how to handle arrays, strings and 
> objects in both directions, memory management, performance, and even how to 
> interact directly with numpy and pandas objects. I hope it's useful for the 
> pythonistas among you.
>
> Any feedback, ideas and questions are welcome.
>

Nice write up! I've use the ctypes approach for a few situations and its 
great to have a detailed reference guide like this. 

Also recently I started using https://github.com/go-python/gopy and have 
been contributing a bunch of fixes and features. For simple situations 
though it is much easier to just use the ctypes approach since you have 
fine grained control over the access. As long has you don't have too much 
to expose to python, and too much memory management and type shimming to do.
 

>
> Amit
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/58381400-d80a-4f31-a5e9-7e12cd8b7a83n%40googlegroups.com.


[go-nuts] Re: Calling Go from Python

2021-04-06 Thread jin jiao
Hi Guys, I want to build a Terraform provider for our platform, so we can 
automate our platform tasks and API calls directly from Terraform. So both 
Golang and Terraform experience will be desired.More info about Terraform 
providers can be found here:
https://learn.hashicorp.com/tutorials/terraform/provider-setup

On Tuesday, 6 April 2021 at 21:10:49 UTC+3 amitl...@gmail.com wrote:

>
> Hi,
> A cheat-sheet I wrote for myself evolved into a full tutorial 
>  on calling Go directly from Python 
> using ctypes and dll's, so I am happy to share it with the community. It 
> starts from the very basics and covers how to handle arrays, strings and 
> objects in both directions, memory management, performance, and even how to 
> interact directly with numpy and pandas objects. I hope it's useful for the 
> pythonistas among you.
>
> Any feedback, ideas and questions are welcome.
>
> Amit
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4df36519-b8b4-44b7-8758-235273b45096n%40googlegroups.com.