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

Nohup and glob #221

Merged
merged 10 commits into from
Sep 15, 2015
Merged

Nohup and glob #221

merged 10 commits into from
Sep 15, 2015

Conversation

henryiii
Copy link
Collaborator

This patch adds two things:

1:
I've added a NOHUP modifier, working on both local and ssh_machines. It unifies the syntax for the two machines and makes it easier to use. The classic methods of doing this, local.daemonic_popen and ssh_machine.nohup are still supported for compatibility. As part of the patch, minor cleanup was done on execution modifiers class structure. The nohup modifier is a little like bash syntax:

>>> local['sleep'][1.234] & NOHUP

vs.

>>> nohup sleep 1.234 & 

It defaults to nohup's std output, but can use new output files and "/dev/null" too, and can append or replace. It even respects > and >> on the command it is applied to.

Like bash's nohup, it disconnects from the process started, even if the current process/shell is exited.

2:
Added support for globbing with a list. You can now do:

>>> local.cwd // ('*.tar.gz', '*.zip')

And get a list of items that match both globs. This helps make up for the fact that that python's glob module doesn't support the '{}' syntax of bash.

@henryiii henryiii added this to the v1.6.0 milestone Sep 14, 2015
tomerfiliba added a commit that referenced this pull request Sep 15, 2015
@tomerfiliba tomerfiliba merged commit cdead57 into master Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants