Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Mono-Readline 0.0.1

    Download button

    No screenshots available
    Downloads: 407  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Patrick Wagstrom | More programs
    GPL / FREE
    March 31st, 2006, 21:29 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Mono-Readline description

    Mono-Readline is a simple little assembly for .Net (specifically Mono) that provides support for GNU Readline.

    Mono-Readline is a simple little assembly for .Net (specifically Mono) that provides support for GNU Readline support within Mono applications.

    Mono-Readline project is based on the code of Martin Baulig in the Mono debugger. I just took it and made it all nice and autoconf/automake enabled.

    It's pretty straight forward, but here is a short sample program:

    using Mono.ReadLine;
    using System;
    using System.Reflection;

    public class Test {

    public static void Main(string[] args) {
    GnuReadLine readline = new GnuReadLine();
    Console.WriteLine("Monkeys!");

    string the_prompt = "This is a test: ";
    string result;
    while (true) {
    result = readline.ReadLine(the_prompt);
    if (result != null) {
    readline.AddHistory(result);
    } else {
    break;
    }
    }
    }
    }

    You should be able to compile this with mcs -r:mono.readline test.cs and get a little executable program that keeps going until you hit CTRL-D. There is lots of other fun you could do such as setting up continuation prompts and what not. Basically, most of this is ripped from Martin's code in the mono debugger.

    But wait, odds are you're going to get some funky error saying it can't find the package or something like that. If that's the case, make sure you have MONO_PATH="/usr/local/lib" set before running the program and compiling. For example to compile run:

    MONO_PATH="/usr/local/lib" mcs -r:mono.readline test.cs

    And then to run type:

    MONO_PATH="/usr/local/lib" mono test.exe

    I'm not a real Mono pro, but my hope is that this could possibly help someone else out. I'm thinking that in the future I may also include a patch for IronPython.

    As always, if you have comments or patches, please let me know.

    Product's homepage

      


    TAGS:

    .Net assembly | Mono assembly | Readline support | Mono-Readline | .Net | Mono

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM