Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Extract function for finding header files
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 19, 2015
1 parent 7ceef87 commit e294b00
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
INCLUDE = ['/usr/include/nanomsg', '/usr/local/include/nanomsg']
BLOCKS = {'{': '}', '(': ')'}

def functions():

def header_files():
for dir in INCLUDE:
if os.path.exists(dir):
break
return {fn: os.path.join(dir, fn) for fn in os.listdir(dir)}

def functions():

lines = []
for fn in os.listdir(dir):
with open(os.path.join(dir, fn)) as f:
for fn, path in header_files().iteritems():
with open(path) as f:
cont = ''
for ln in f:

Expand Down

0 comments on commit e294b00

Please sign in to comment.