Thread overview
The problem with text output in DDT with PyD
Apr 22, 2015
Dennis Ritchie
May 01, 2015
Bruno Medeiros
May 01, 2015
Dennis Ritchie
April 22, 2015
In the Eclipse console does not work output version Python. When I run the executable through the CMD .\mypyd.exe, then everything works fine:
3.4.3 (v3.4.3: 9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)]

app.d
-----
import std.stdio;
import pyd.pyd, pyd.embedded;

shared static this() {
    py_init();
}

void main() {
	
	auto script = new InterpContext;
	script.py_stmts("import sys");
	
	script.py_stmts("print(sys.version)"); // prints nothing in the Eclipse console
}
-----

dub.json
-----
{
	"name" : "myPyD",
	"description" : "Hello World - A minimal DUB bundle.",
	"dependencies" : {
		"pyd": "~>0.9.7",
	},
	"subConfigurations": {
            "pyd": "python34",
    }
}
-----
What could be the problem?
May 01, 2015
On 22/04/2015 08:06, Dennis Ritchie wrote:
> In the Eclipse console does not work output version Python. When I run
> the executable through the CMD .\mypyd.exe, then everything works fine:
> 3.4.3 (v3.4.3: 9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit
> (Intel)]
>
> app.d
> -----
> import std.stdio;
> import pyd.pyd, pyd.embedded;
>
> shared static this() {
>      py_init();
> }
>
> void main() {
>
>      auto script = new InterpContext;
>      script.py_stmts("import sys");
>
>      script.py_stmts("print(sys.version)"); // prints nothing in the
> Eclipse console
> }
> -----
>
> dub.json
> -----
> {
>      "name" : "myPyD",
>      "description" : "Hello World - A minimal DUB bundle.",
>      "dependencies" : {
>          "pyd": "~>0.9.7",
>      },
>      "subConfigurations": {
>              "pyd": "python34",
>      }
> }
> -----
> What could be the problem?

Isn't this again the problem about stdout not being flushed?


-- 
Bruno Medeiros
https://twitter.com/brunodomedeiros
May 01, 2015
On Friday, 1 May 2015 at 09:02:23 UTC, Bruno Medeiros wrote:
> Isn't this again the problem about stdout not being flushed?

I think not. stdout.flush() does not work.