Giter Club home page Giter Club logo

Comments (3)

bitprophet avatar bitprophet commented on July 19, 2024

Googled a bit more to check the above link's assertion that one needs to explicitly tell pexpect to expect an EOF, and as it turns out one of the official pexpect homepages mentions this! Go here: http://www.noah.org/python/pexpect/ and search for 'exception'.

Will poke at this side of things and hope it meshes with how I am using the lib...

from invoke.

bitprophet avatar bitprophet commented on July 19, 2024

Bugger, with p.expect(pexpect.EOF) in place, the error does not fire, but it seems to be skipping the out_filter attached to interact(). I think this is because expect means to wait until its arg shows up [duh] and thus by the time we arrive at our interact call things are already done.

The docs mention how when you expect-til-EOF, the output is available in p.before, and that bears up -- when expecting, it contains the stdout/err mix, when not expecting, it's None. However this doesn't help me because I need realtime.

Need to figure out if there's another way or if I should just suck it up and try catching this specific OSError and move on.

from invoke.

bitprophet avatar bitprophet commented on July 19, 2024

Nope, no real way around this. Sucking up & catching/ignoring this specific OSError, and also attaching to result object for sanity's sake. Seriously doubt anybody will need it, but now my conscience is clean.

from invoke.

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.