4.1.2. sciexp2.exprun.spur.SshShell

Methods

close()
open(name[, mode])
run(*args, **kwargs)
spawn(*args, **kwargs)
temporary_dir()
upload_dir(local_dir, remote_dir, ignore)

Attributes

files
class SshShell(*args, **kwargs)

Bases: spur.ssh.SshShell

An extended version of spur.SshShell.

It will properly kill all created processes when exiting.

The shell object has two new members:

  • hostname: str
    Target host name.
  • username: str
    Target user name.

The run and spawn methods have two new arguments:

  • exit_on_error: bool, optional
    Whether to exit the program when the process fails to execute.
  • kill: list of str, optional
    Command to execute when killing the process. Useful when process is run with sudo.
run(*args, **kwargs)
spawn(*args, **kwargs)