Re: Using python in D

2019-06-09 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2019-06-09 at 03:42 +, rnd via Digitalmars-d-learn wrote: > […] > I also wanted to know: Once executable is successfully created, > will it work on systems where Python and pandas are not installed? I suspect not, but then I do not use Windows. I would be surprised if the executable

Re: Using python in D

2019-06-09 Thread evilrat via Digitalmars-d-learn
On Sunday, 9 June 2019 at 03:42:23 UTC, rnd wrote: Thanks for guidance. I also wanted to know: Once executable is successfully created, will it work on systems where Python and pandas are not installed? That is unlikely. PyD is just a D package, it doesn't have the ability to mess up with

Re: Using python in D

2019-06-08 Thread rnd via Digitalmars-d-learn
On Saturday, 8 June 2019 at 19:35:00 UTC, Russel Winder wrote: PyD is hosted on GitHub so it is a question of putting in an issue there: https://github.com/ariovistus/pyd/issues The best bet is to write up what you have presented on email here, and then let the PyD developers guide y

Re: Using python in D

2019-06-08 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2019-06-08 at 16:53 +, rnd via Digitalmars-d-learn wrote: > […] > I did not delete Python2.7 since I thought there could be some > part of Debian/installed package that may depend on it. But I > will try to do it now. I overstated the case a bit. I do not use Python 2.7 but there are

Re: Using python in D

2019-06-08 Thread rnd via Digitalmars-d-learn
On Saturday, 8 June 2019 at 09:11:48 UTC, Russel Winder wrote: ... ... The problem seems to be that PyD is not looking in the right place for importing packages, but this is pure speculation. Perhaps this merits a bug report against the PyD source repository? Thanks for your time, effort and

Re: Using python in D

2019-06-08 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2019-06-07 at 14:02 +, rnd via Digitalmars-d-learn wrote: This being D meets Python, I thought I'd take a look at this one. > I tried following in dub.selections.json file: > > { > "fileVersion": 1, > "versions": { > "pyd": "0.10.5" > }, > "subCo

Re: Using python in D

2019-06-07 Thread rnd via Digitalmars-d-learn
On Friday, 7 June 2019 at 10:55:22 UTC, JN wrote: On Friday, 7 June 2019 at 05:04:30 UTC, rnd wrote: On Friday, 7 June 2019 at 04:39:14 UTC, rikki cattermole wrote: On 07/06/2019 3:54 PM, rnd wrote: How should I 'initialize python' ? The example is probably a good place to begin. https://g

Re: Using python in D

2019-06-07 Thread Rnd via Digitalmars-d-learn
On Friday, 7 June 2019 at 10:55:22 UTC, JN wrote: On Friday, 7 June 2019 at 05:04:30 UTC, rnd wrote: On Friday, 7 June 2019 at 04:39:14 UTC, rikki cattermole wrote: On 07/06/2019 3:54 PM, rnd wrote: How can I specify Python version 3 in pyd? https://github.com/ariovistus/pyd "To use with d

Re: Using python in D

2019-06-07 Thread JN via Digitalmars-d-learn
On Friday, 7 June 2019 at 05:04:30 UTC, rnd wrote: On Friday, 7 June 2019 at 04:39:14 UTC, rikki cattermole wrote: On 07/06/2019 3:54 PM, rnd wrote: How should I 'initialize python' ? The example is probably a good place to begin. https://github.com/ariovistus/pyd/blob/master/examples/simpl

Re: Using python in D

2019-06-06 Thread rnd via Digitalmars-d-learn
On Friday, 7 June 2019 at 04:39:14 UTC, rikki cattermole wrote: On 07/06/2019 3:54 PM, rnd wrote: How should I 'initialize python' ? The example is probably a good place to begin. https://github.com/ariovistus/pyd/blob/master/examples/simple_embedded/hello.d Thanks for the link. After putt

Re: Using python in D

2019-06-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/06/2019 3:54 PM, rnd wrote: Edit: I tried above D program and got following error: core.exception.AssertError@/home/abcde/.dub/packages/pyd-0.10.5/pyd/infrastructure/pyd/embedded.d(53): python not initialized ??:? _d_assert_msg [0x5562d3f3c466] /home/abcde/.dub/packages

Re: Using python in D

2019-06-06 Thread rnd via Digitalmars-d-learn
Edit: I tried above D program and got following error: core.exception.AssertError@/home/abcde/.dub/packages/pyd-0.10.5/pyd/infrastructure/pyd/embedded.d(53): python not initialized ??:? _d_assert_msg [0x5562d3f3c466] /home/abcde/.dub/packages/pyd-0.10.5/pyd/infrastructure/pyd/e

Using python in D

2019-06-06 Thread rnd via Digitalmars-d-learn
I have a simple python script file which contains following 3 statements: import pandas df = pandas.read_csv('testfile.csv') print(df[0:3]) Can I incorporate above in a D program? I see there is pyd package for using python in D: https://code.dlang.org/packages/pyd Will followi