Skip to content

Instantly share code, notes, and snippets.

@waldronj
Created May 2, 2014 02:14
Show Gist options
  • Select an option

  • Save waldronj/be905b4c2d6d44193698 to your computer and use it in GitHub Desktop.

Select an option

Save waldronj/be905b4c2d6d44193698 to your computer and use it in GitHub Desktop.
import pexpect
import sys
from sys import argv
script, environment = argv
command = "pyctrl-shell -e %s" % environment
child = pexpect.spawn(command, logfile=sys.stdout)
child.expect("In ", timeout=10)
child.sendline("bigip.active_partition = 'SomePartition'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment