How to log in console in Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to log in console in Windows

Mariano Martinez Peck
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

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] 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

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

David T. Lewis
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] On Behalf Of David T. Lewis
Sent: Sunday, May 17, 2009 8:15 AM
To: [hidden email]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

David T. Lewis
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: [hidden email] [mailto:[hidden email]] On Behalf Of David T. Lewis
> Sent: Sunday, May 17, 2009 8:15 AM
> To: [hidden email]
> 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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] On Behalf Of David T. Lewis
Sent: Sunday, May 17, 2009 12:11 PM
To: [hidden email]
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: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> David T. Lewis
> Sent: Sunday, May 17, 2009 8:15 AM
> To: [hidden email]
> 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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

Mariano Martinez Peck
In reply to this post by David T. Lewis


On Sun, May 17, 2009 at 10:14 AM, David T. Lewis <[hidden email]> 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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: How to log in console in Windows

David T. Lewis
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 <[hidden email]>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



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project