Skip to content

Instantly share code, notes, and snippets.

@branning
Created June 10, 2015 18:33
Show Gist options
  • Select an option

  • Save branning/d75fa15e92f9ca7dc08c to your computer and use it in GitHub Desktop.

Select an option

Save branning/d75fa15e92f9ca7dc08c to your computer and use it in GitHub Desktop.
kind of like perl -pe, but less fun
name: channeltest
dependencies:
- pip=7.0.3=py27_0
- python=2.7.10=0
- scandir=1.1=py27_0
- setuptools=17.0=py27_0
with open('environment.yml', 'r') as yml:
for line in yml:
print '\n'.join(('channels:','- branning','dependencies:')) if line == 'dependencies:\n' else line.rstrip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment