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

Per-line annotation and various improvements #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

HoverHell
Copy link

No description provided.

@quinkennedy
Copy link
Contributor

Hey HoverHell,
Thanks for the pull request. Could you please provide sample output with your print_annotated_lines enabled and disabled?

Also, I assume setuptools.setup is the preferred, contemporary version of distutils.core.setup? Or are there more concrete reasons to use one over the other?

Thanks!

@HoverHell
Copy link
Author

setuptools.setup is the preferred, contemporary version of distutils.core.setup

The primary reason I myself use it is for setup.py develop (which installs a link to the source tree in the virtualenv).

In general, it is a good idea to try … setuptools … ImportError … distutils as setuptools is pretty much a compatible replacement but not always available.

provide sample output with

Without:

$ pssh -H v10 -H v11 -P head -n 2 /proc/cpuinfo
v11: processor  : 0
vendor_id       : GenuineIntel
[1] 10:12:31 [SUCCESS] v11
v10: processor  : 0
vendor_id       : GenuineIntel
[2] 10:12:31 [SUCCESS] v10

With:

$ pssh -H v10 -H v11 -P head -n 2 /proc/cpuinfo
v11 -> processor        : 0
v11 -> vendor_id        : GenuineIntel
v10 -> processor        : 0
v10 -> vendor_id        : GenuineIntel
[1] 10:12:14 [SUCCESS] v10
[2] 10:12:14 [SUCCESS] v11

The more controversial thing it does is the backslash for unterminated lines:

$ pssh -H v10 -H v11 -P 'head -n 2 /proc/cpuinfo | tr "\n" " "'
v11 -> processor        : 0 vendor_id   : GenuineIntel \
[1] 10:17:28 [SUCCESS] v11
v10 -> processor        : 0 vendor_id   : GenuineIntel \
[2] 10:17:28 [SUCCESS] v10

Of course it is mostly useful for output that doesn't appear at once, e.g. aptitude install ….

@HoverHell
Copy link
Author

After a bit more use, I conclude that backslash for unterminated lines is generally problematic and it is usually preferable to use line-buffering; which I added.

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

Successfully merging this pull request may close these issues.

2 participants