New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed values for events argument in pexpect.run() #176

Closed
sbancal opened this Issue Feb 10, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@sbancal
Contributor

sbancal commented Feb 10, 2015

In pexpect/__init__.py line 209, events's value is checked to be an instance of types.FunctionType.

In some case it could be usefull to give an instance's method types.MethodType. Are there reasons for not allowing it?

Actual behavior is that If we give a types.MethodType, we get the error "TypeError: The callback must be a string or function."

@jquast

This comment has been minimized.

Member

jquast commented Feb 10, 2015

probably True, could stand to be is callable(). a PR that includes tests for method would be most appreciated if you're interested.

@sbancal

This comment has been minimized.

Contributor

sbancal commented Feb 13, 2015

Just a question ... I'm not (yet) used to github practice. What do you mean by "needs-changelog"?

@jquast

This comment has been minimized.

Member

jquast commented Feb 13, 2015

need to add to doc/history.rst before merge

@jquast

This comment has been minimized.

Member

jquast commented Feb 15, 2015

I had to make another PR for the minor additions I made, Closing in preference to PR #178.

Thank you again for your contribution, this will be in pexpect release version 4.0.

@jquast jquast closed this Feb 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment