Changeset d214124 for python/lib


Ignore:
Timestamp:
Sep 26, 2018, 2:44:58 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
c7155e9
Parents:
8ced1e8
Message:

python/lib/gen_external.py: split long functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_external.py

    r8ced1e8 rd214124  
    8686    ''' return a dense and preprocessed  string of all c declarations implied by aubio.h
    8787    '''
     88    cpp_output = get_cpp_output(header=header, usedouble=usedouble)
     89    return filter_cpp_output (cpp_output)
     90
     91
     92def get_cpp_output(header=header, usedouble=False):
     93    ''' find and run a C pre-processor on aubio.h '''
    8894    cpp_cmd = get_preprocessor()
    8995
     
    120126        cpp_output = [l.strip() for l in cpp_output.decode('utf8').split('\n')]
    121127
    122     cpp_output = filter(lambda y: len(y) > 1, cpp_output)
     128    return cpp_output
     129
     130def filter_cpp_output(cpp_raw_output):
     131    ''' prepare cpp-output for parsing '''
     132    cpp_output = filter(lambda y: len(y) > 1, cpp_raw_output)
    123133    cpp_output = list(filter(lambda y: not y.startswith('#'), cpp_output))
    124134
Note: See TracChangeset for help on using the changeset viewer.