Skip to content

Instantly share code, notes, and snippets.

@rubenmromero
Last active August 27, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubenmromero/365b162062b5a9abcab3436a889538eb to your computer and use it in GitHub Desktop.
Save rubenmromero/365b162062b5a9abcab3436a889538eb to your computer and use it in GitHub Desktop.
Python :: Iterate by lines a variable that contains strings spread over several lines getting words allocated in specific column (separated by spaces)
with cd(project_path):
result = sudo('git submodule status')
for submodule in result.stdout.splitlines():
application = submodule.split()[1]
deploy(application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment