-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 25.08.2010 18:09, schrieb Roger Pack:
>
>> I'm trying to write something like a terminal emulator for use inside a
>> wxRuby GUI as a debugging console in the current context or just as a
>> possibility to issue some fast commands rather than clicking around. I
>> have to problems with this:
>>
>> 1. I wanted to use IRB to just allow the user to enter Ruby code in the
>> current project context, but IRB seems to only read from STDIN. I didn't
>> find a possibility to direct IRB somewhere else. So, is there one or can
>> I give up on this?
>
> A few related projects that might help:
>
> live console [1] monkey patches irb to allow it to receive from a socket
> (probably not quite what you wanted...)
> as does fxri
> [1] http://github.com/pete/live-console/blob/master/lib/live_console.rb
>
> redcar also has a "REPL" which "is like" IRB (without ever using irb
> though).
>
> GL.
> -r
Thanks, fxri pointed me to the right direction. I already solved problem
2 by using IO.pipe which I didn't know before and was positively
surprised that it works on Windows, and hopefully I can conquer IRB now.
I will also have a look at REPL.
However, it's quite annoying that methods like IO#nread or IO#ready?
aren't implemented on Windows (event with requiring "io/wait" #ready?
always returns false and #nread gives a NoMethodError). I wish that
project should only work on Linux...
Thanks,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkx2kFIACgkQDYShvwAbcNmB/QCeL0D/saIEyV62q2onWNahVWOi
woAAn1LARMAooVQaLZ3s0TYGN2UnUlEf
=tkUl
-----END PGP SIGNATURE-----