Skip to content

Instantly share code, notes, and snippets.

@allanlei allanlei/
Created Aug 27, 2014

What would you like to do?
Parse Procfile
def procfile(filepath):
with open(filepath, 'rb') as fp:
for process_line in fp.readlines():
process_line = process_line.strip()
if not process_line or process_line.startswith('#'):
process_name, command = process_line.split(':', 1)
yield process_name.strip(), command.strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.