Skip to content
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

Support multiple statements at once #6

Closed
ramnes opened this issue May 26, 2020 · 2 comments
Closed

Support multiple statements at once #6

ramnes opened this issue May 26, 2020 · 2 comments

Comments

@ramnes
Copy link

ramnes commented May 26, 2020

Hey, thanks for the nifty tool!

It seems that sending multiple statements at once isn't supported so far (i.e. nc ... < foo.py).

Would you be interested in such a feature? I'd be glad to help if you'd provide a few guidelines on how you'd want to achieve this. :)

@nhoad
Copy link
Owner

nhoad commented May 26, 2020

Hey! Glad you like it :)

I'm very interested in contributions! What's the issue you're experiencing? I'm not having any trouble passing in multiple statements, e.g.

A server:

import asyncio
import aiomanhole

aiomanhole.start_manhole(port=1234)
asyncio.get_event_loop().run_forever()

Client + example output:

$ cat foo.py
print("Hello")
print("World")
a = 1 + 2
print(a)
$ ncat localhost 1234 < foo.py
>>> Hello
>>> World
>>> >>> 3

@ramnes
Copy link
Author

ramnes commented May 26, 2020

My bad, it does work! I made a programming error (logging with the incorrect level) in my tests and assumed that there was a bug due to the multiple >>> printed. :)

@ramnes ramnes closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants