Code Monkey home page Code Monkey logo

Comments (4)

y-me-y avatar y-me-y commented on July 30, 2024 3

@rymka1989 - that is actually regex for matching the end of line and before a return if a multiline input. There isn’t a literal match for the string $.

from paramiko-expect.

fgimian avatar fgimian commented on July 30, 2024 1

As @y-me-y explained, this is a regular expression, the $ is the end of line, not a literal. More likely there's something happening on your prompt before the end of line is matched.

from paramiko-expect.

rymkapro avatar rymkapro commented on July 30, 2024

Hi!
I'm running Centos and there is no $ symbol in prompt, it has # instead.
In other operations, e.g. changing user password, there are no symbols ($, #) at all.

So, may be it should better not to include such symbols in re_strings in expect method?

After I've removed + '$' everything works fine.

I realized something :)
If i login with root, i have # at the end of the prompt, if i login with another user, i have $.
But previous comment, i think, is still actual (we don't need hardcoded $)

from paramiko-expect.

rymkapro avatar rymkapro commented on July 30, 2024

@rymka1989 - that is actually regex for matching the end of line and before a return if a multiline input. There isn’t a literal match for the string $.
As @y-me-y explained, this is a regular expression, the $ is the end of line, not a literal. More likely there's something happening on your prompt before the end of line is matched.

I'm very sorry! I understood, that i was wrong.
Thank you very much for your replies!

from paramiko-expect.

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.