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

Does not print partial lines #116

Open
pseyfert-sevensense opened this issue Nov 1, 2023 · 0 comments
Open

Does not print partial lines #116

pseyfert-sevensense opened this issue Nov 1, 2023 · 0 comments

Comments

@pseyfert-sevensense
Copy link

I thought subprocess-tee would fit in nicely for the following example

from subprocess_tee import run
o = run("ssh remotehost -t sudo cat /super/secret/file"))
# now trim of the password prompt from o

i.e. someone running my python script should see the sudo password prompt from the remote host, and I can capture the cat output in a local variable (i don't want my users to blindly type their sudo passwords, assuming the ssh connection got established, though they still have to trust me that i'm not doing anything nasty with the password). yet, this doesn't work as desired because there is no linefeed after [sudo] password for <user>: and the prompt only becomes printed by subprocess-tee after the user hits return.

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

1 participant