Code Monkey home page Code Monkey logo

Comments (3)

hanslub42 avatar hanslub42 commented on August 24, 2024

Great - thanks! Of course a python version is feasible (or a C, Haskell or Cobol version, for that matter...) I'll have a good look at it, and will try to incorporate it in the next rlwrap release!

from rlwrap.

hokuda avatar hokuda commented on August 24, 2024

Hans, thanks a lot for merging and improving it!!!

from rlwrap.

hanslub42 avatar hanslub42 commented on August 24, 2024

@hokuda: Merging: done. Improving: hmmm, I'm not that fluent in python. Feel free to change things. Especially moving from bytes to strings (and back) is fraught with dangers. rlwrap, like most Unix commands, is completely coding-agnostic, and only ever sees streams of bytes, which it never really inspects. Filters look at the content of those streams, and will want to work with strings ("capitalize Every Word In The Prompt >")

A good (if rather rough) test is rlwrap -z null.py cat /dev/random . With errors="strict", the default setting, decode() will stumble on the random bytes, and the filter will die.

Decoding with errors="ignore" seems to work well, until now.

Again, thanks for the excellent work!

from rlwrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.