[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

/dev/tty in windows

Wybo Dekker

6/23/2005 2:09:00 PM

5 Answers

Ralph \"PJPizza\" Siegler

6/23/2005 2:18:00 PM

0

On Thu, Jun 23, 2005 at 11:09:14PM +0900, Wybo Dekker wrote:
> under linux I use
>
> STDIN.reopen('/dev/tty')
>
> what is the equivalent for Windows?
>
> And where can I find documentation about the differences between OS's?
>
> --
> Wybo
>




file.open("COM1:")


Ralph "PJPizza" Siegler


Robert Klemme

6/23/2005 2:43:00 PM

0

Ralph "PJPizza" Siegler wrote:
> On Thu, Jun 23, 2005 at 11:09:14PM +0900, Wybo Dekker wrote:
>> under linux I use
>>
>> STDIN.reopen('/dev/tty')
>>
>> what is the equivalent for Windows?
>>
>> And where can I find documentation about the differences between
>> OS's?
>>
>> --
>> Wybo
>>
>
>
>
>
> file.open("COM1:")

That's the serial port if I'm not mistaken. I'd try "CON" or "CON:".

Kind regards

robert



>
>
> Ralph "PJPizza" Siegler

Guillaume Marcais

6/23/2005 2:52:00 PM

0

On Thu, 2005-06-23 at 23:17 +0900, Ralph "PJPizza" Siegler wrote:
> On Thu, Jun 23, 2005 at 11:09:14PM +0900, Wybo Dekker wrote:
> > under linux I use
> >
> > STDIN.reopen('/dev/tty')
> >
> > what is the equivalent for Windows?
> >
> > And where can I find documentation about the differences between OS's?
> >
> > --
> > Wybo
> >
>
>
>
>
> file.open("COM1:")

Hum... no, that would be file.open("/dev/ttyS0"). /dev/tty is the
console, not the serial port.

That said, I don't know the answer to the original question, sorry.

Guillaume.




Wybo Dekker

6/23/2005 3:31:00 PM

0

Ralph \"PJPizza\" Siegler

6/23/2005 5:27:00 PM

0

On Fri, Jun 24, 2005 at 12:31:09AM +0900, Wybo Dekker wrote:
> On Thu, 23 Jun 2005, Robert Klemme wrote:
>
> > Ralph "PJPizza" Siegler wrote:
> > > On Thu, Jun 23, 2005 at 11:09:14PM +0900, Wybo Dekker wrote:
> > >> under linux I use
> > >>
> > >> STDIN.reopen('/dev/tty')
> > >>
> > >> what is the equivalent for Windows?
> > >>
> > >> And where can I find documentation about the differences between
> > >> OS's?
> > >>
> > >> --
> > >> Wybo
> > >>
> > >
> > >
> > >
> > >
> > > file.open("COM1:")
> >
> > That's the serial port if I'm not mistaken. I'd try "CON" or "CON:".
>
> that's it, either CON or CON:
> Thanks!
> --
> Wybo
>

yup, that's serial port, sorry, been doing headless Linux too much :P