[Pharo-project] How to log in console in Windows
Hi folks! I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ? Thanks a lot in advance, Mariano
Mariano, Hmmmm. Something not working in Windows - imaging that :) Sorry, I feel your pain and am trying to run for the Penguin-filled hills as we speak. Dumb question: have you tried the OS Process plugin. I've only skimmed it in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams. No surprise, Windows manages to make a mess of it. Sorry that I can't be of any real help. Bill ________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Mariano Martinez Peck Sent: Friday, May 15, 2009 9:37 AM To: The general-purpose Squeak developers list; Pharo Development Subject: [Pharo-project] How to log in console in Windows Hi folks! I am calling a external shared library with FFI. This library does some puts(""); or printf(); In Linux, I open Squeak from command line and I can see the outputs of puts() and printf() in the console where I started Squeak. The problem is in Windows. I tried opening Squeak from cmd but didn't work. Nothing is shown in the console. Is there a way of doing this ? Thanks a lot in advance, Mariano
On Fri, May 15, 2009 at 08:26:34PM -0400, Schwab,Wilhelm K wrote:
Dumb question: have you tried the OS Process plugin. I've only skimmed it in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams.
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest. Dave
Dave, I am somewhere between curious and interested. If you document what you have learned, at least it will be in the list archives for future reference. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of David T. Lewis Sent: Sunday, May 17, 2009 8:15 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] How to log in console in Windows On Fri, May 15, 2009 at 08:26:34PM -0400, Schwab,Wilhelm K wrote:
Dumb question: have you tried the OS Process plugin. I've only skimmed it in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams.
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest. Dave _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I've done so a few times in the past. Just let me know if you are trying to build it and need a hand. Dave On Sun, May 17, 2009 at 11:14:50AM -0400, Schwab,Wilhelm K wrote:
Dave,
I am somewhere between curious and interested. If you document what you have learned, at least it will be in the list archives for future reference.
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of David T. Lewis Sent: Sunday, May 17, 2009 8:15 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] How to log in console in Windows
On Fri, May 15, 2009 at 08:26:34PM -0400, Schwab,Wilhelm K wrote:
Dumb question: have you tried the OS Process plugin. I've only skimmed it in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams.
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest.
Dave, Ok, sorry about that. I was thinking more along the lines that seeing what you have learned might (1:10^6)trigger a useful thought in my head. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of David T. Lewis Sent: Sunday, May 17, 2009 12:11 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] How to log in console in Windows I've done so a few times in the past. Just let me know if you are trying to build it and need a hand. Dave On Sun, May 17, 2009 at 11:14:50AM -0400, Schwab,Wilhelm K wrote:
Dave,
I am somewhere between curious and interested. If you document what you have learned, at least it will be in the list archives for future reference.
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of David T. Lewis Sent: Sunday, May 17, 2009 8:15 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] How to log in console in Windows
On Fri, May 15, 2009 at 08:26:34PM -0400, Schwab,Wilhelm K wrote:
Dumb question: have you tried the OS Process plugin. I've only skimmed it in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams.
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Sun, May 17, 2009 at 10:14 AM, David T. Lewis <lewis@mail.msen.com>wrote:
On Fri, May 15, 2009 at 08:26:34PM -0400, Schwab,Wilhelm K wrote:
Dumb question: have you tried the OS Process plugin. I've only skimmed
it
in Squeak/Pharo, but there is a similar goodie for Dolphin, and it goes to great pains to put streams around the OS streams.
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest.
I think you didn't understood my question or I didn't understood your reply. I don't need to write to windows console from squeak. I am calling a C library with FFI from Squeak and than library writes to stdout using printf. I want to be able to see that output in the cmd console where I open squeak. Cheers, Mariano
Dave
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Sun, May 17, 2009 at 03:44:20PM -0300, Mariano Martinez Peck wrote:
On Sun, May 17, 2009 at 10:14 AM, David T. Lewis <lewis@mail.msen.com>wrote:
Yes, the OSProcessPlugin does this for Windows (open/close the Windows console, write to console as stdout). However, you have to build your own plugin and patch some FilePlugin support code to make it work. I can explain the details if there is an interest.
I think you didn't understood my question or I didn't understood your reply. I don't need to write to windows console from squeak. I am calling a C library with FFI from Squeak and than library writes to stdout using printf. I want to be able to see that output in the cmd console where I open squeak.
Mariano, The discussion may have been getting a bit off topic here. But yes, actually I do understand your original question. I just have not thought of a good answer yet ;) Dave
participants (3)
-
David T. Lewis -
Mariano Martinez Peck -
Schwab,Wilhelm K