digitalmars.D.learn - What's the latest news for calling D from python 3 using ctypes?
- Enjoys Math (5/5) Feb 27 2018 I am making a library that will run very speedily in D (or,
- Nicholas Wilson (4/9) Feb 27 2018 http://code.dlang.org/packages/pyd
- Enjoys Math (7/17) Feb 27 2018 Thank you! That looks like what I need. How do you install pyd
- Enjoys Math (4/4) Feb 27 2018 Got it.
- Enjoys Math (4/8) Feb 27 2018 Then you do
- Enjoys Math (13/13) Feb 27 2018 Can't build now:
- Nicholas Wilson (5/18) Feb 27 2018 For some reason, idk why, PyD is a dub source dependency (as
- chuoiit18 (2/12) Feb 27 2018
- chuoiit18 (4/17) Apr 20 2018 , This is a great article. It gave me a lot of useful
- Enjoys Math (4/10) Feb 28 2018 Seems like it already is. In VisualD compiler settings /
- Enjoys Math (2/13) Feb 28 2018 Solution: Use C++ instead.
- Enjoys Math (4/14) Feb 27 2018 How would you get VisualD + PyD to work nicely together? See my
I am making a library that will run very speedily in D (or, failing that, C++) and do the backend work of a PyQt5 gui. Was wondering the simplest route to accomplish this, preferably in ctypes calls. Thanks.
Feb 27 2018
On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:I am making a library that will run very speedily in D (or, failing that, C++) and do the backend work of a PyQt5 gui. Was wondering the simplest route to accomplish this, preferably in ctypes calls. Thanks.http://code.dlang.org/packages/pyd With PyD you can wrap the D functions for python instead of calling them through types in python.
Feb 27 2018
On Wednesday, 28 February 2018 at 00:18:17 UTC, Nicholas Wilson wrote:On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:Thank you! That looks like what I need. How do you install pyd with dub so that I can import ? dub fetch pyd dub run pyd doesn't work. Will try other params and get back to this thread.I am making a library that will run very speedily in D (or, failing that, C++) and do the backend work of a PyQt5 gui. Was wondering the simplest route to accomplish this, preferably in ctypes calls. Thanks.http://code.dlang.org/packages/pyd With PyD you can wrap the D functions for python instead of calling them through types in python.
Feb 27 2018
Got it. dub init myproject from within my python frontend source dir will create a subdirectory.
Feb 27 2018
On Wednesday, 28 February 2018 at 01:10:36 UTC, Enjoys Math wrote:Got it. dub init myproject from within my python frontend source dir will create a subdirectory.Then you do dub generate visuald from within the subdir myproject.
Feb 27 2018
Can't build now: ------ Build started: Project: categorytheorybackend, Configuration: debug Win32 ------ Building C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categorytheorybackend.exe... Error: Error writing file 'obj\debug\dummy\dummy\dummy\dummy\dummy\categorytheorybackend\..\..\..\..\..\Users\FruitfulApproach\AppData\Roaming\dub\packages\pyd-0.9.9\pyd\infrastructure\deimos\python\abstract_.obj' Building C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categ rytheorybackend.exe failed! Details saved as "file://C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\.dub\obj\debug\dummy\dummy\dummy\dummy\dummy\categorytheorybackend\categorytheorybackend.buildlog.html" ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Feb 27 2018
On Wednesday, 28 February 2018 at 01:19:25 UTC, Enjoys Math wrote:Can't build now: ------ Build started: Project: categorytheorybackend, Configuration: debug Win32 ------ Building C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categorytheorybackend.exe... Error: Error writing file 'obj\debug\dummy\dummy\dummy\dummy\dummy\categorytheorybackend\..\..\..\..\..\Users\FruitfulApproach\AppData\Roaming\dub\packages\pyd-0.9.9\pyd\infrastructure\deimos\python\abstract_.obj' Building C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\categ rytheorybackend.exe failed! Details saved as "file://C:\MyProjects\___ENJOYS_MATH\CategoryTheoryFrontend\CategoryTheoryBackend\.dub\obj\debug\dummy\dummy\dummy\dummy\dummy\categorytheorybackend\categorytheorybackend.buildlog.html" ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========For some reason, idk why, PyD is a dub source dependency (as opposed to a library). If you add \path\to\pyd to the include directory(?) dub variable (or -I\path\to\pyd to dmd/ldc/gdc) it should hopefully work.
Feb 27 2018
On Wednesday, 28 February 2018 at 02:40:59 UTC, Nicholas Wilson wrote:On Wednesday, 28 February 2018 at 01:19:25 UTC, Enjoys Math wrote:[...]For some reason, idk why, PyD is a dub source dependency (as opposed to a library). If you add \path\to\pyd to the include directory(?) dub variable (or -I\path\to\pyd to dmd/ldc/gdc) it should hopefully work., This is a great article. It gave me a lot of useful information. thank you very much. Link profile: http://phongkhamdakhoathegioi.vn/me-day-ve-noi-va-cach-chua-tri-hieu-qua.html
Feb 27 2018
On Wednesday, 28 February 2018 at 03:08:05 UTC, chuoiit18 wrote:On Wednesday, 28 February 2018 at 02:40:59 UTC, Nicholas Wilson wrote:, This is a great article. It gave me a lot of useful information. thank you very much. Link profile: http://dakhoaauahcm.vnOn Wednesday, 28 February 2018 at 01:19:25 UTC, Enjoys Math wrote:[...]For some reason, idk why, PyD is a dub source dependency (as opposed to a library). If you add \path\to\pyd to the include directory(?) dub variable (or -I\path\to\pyd to dmd/ldc/gdc) it should hopefully work., This is a great article. It gave me a lot of useful information. thank you very much. Link profile: http://phongkhamdakhoathegioi.vn/me-day-ve-noi-va-cach-chua-tri-hieu-qua.html
Apr 20 2018
Seems like it already is. In VisualD compiler settings / additional import paths it's set to: "..\source" "..\..\..\..\..\Users\FruitfulApproach\AppData\Roaming\dub\packages\pyd-0.9.9\pyd\infrastructure"========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========For some reason, idk why, PyD is a dub source dependency (as opposed to a library). If you add \path\to\pyd to the include directory(?) dub variable (or -I\path\to\pyd to dmd/ldc/gdc) it should hopefully work.
Feb 28 2018
On Wednesday, 28 February 2018 at 17:34:49 UTC, Enjoys Math wrote:Solution: Use C++ instead.Seems like it already is. In VisualD compiler settings / additional import paths it's set to: "..\source" "..\..\..\..\..\Users\FruitfulApproach\AppData\Roaming\dub\packages\pyd-0.9.9\pyd\infrastructure"========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========For some reason, idk why, PyD is a dub source dependency (as opposed to a library). If you add \path\to\pyd to the include directory(?) dub variable (or -I\path\to\pyd to dmd/ldc/gdc) it should hopefully work.
Feb 28 2018
On Wednesday, 28 February 2018 at 00:18:17 UTC, Nicholas Wilson wrote:On Tuesday, 27 February 2018 at 23:59:10 UTC, Enjoys Math wrote:How would you get VisualD + PyD to work nicely together? See my failed build post above.I am making a library that will run very speedily in D (or, failing that, C++) and do the backend work of a PyQt5 gui. Was wondering the simplest route to accomplish this, preferably in ctypes calls. Thanks.http://code.dlang.org/packages/pyd With PyD you can wrap the D functions for python instead of calling them through types in python.
Feb 27 2018