Ignore:
Timestamp:
Apr 18, 2016, 10:48:53 PM (8 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, pitchshift, sampler, timestretch, yinfft+
Children:
2e4ae1d
Parents:
7c785e6 (diff), b8ed85e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge pull request #40 from nphilipp/develop--py3k-fixes

Miscellaneous fixes for Python, mostly version 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/generator.py

    r7c785e6 r4041a6d  
    44
    55import os, sys, shutil
    6 from gen_pyobject import write_msg, gen_new_init, gen_do, gen_members, gen_methods, gen_finish
     6from .gen_pyobject import write_msg, gen_new_init, gen_do, gen_members, gen_methods, gen_finish
    77
    88def get_cpp_objects():
     
    1212  cpp_output = filter(lambda y: len(y) > 1, cpp_output)
    1313  cpp_output = filter(lambda y: not y.startswith('#'), cpp_output)
     14  cpp_output = list(cpp_output)
    1415
    1516  i = 1
     
    8687      object_methods = [a.strip() for a in object_methods]
    8788      object_methods = filter(lambda x: not x.startswith('typedef'), object_methods)
     89      object_methods = list(object_methods)
    8890      #for method in object_methods:
    8991      #    write_msg(method)
    90       new_methods = filter(lambda x: 'new_'+object_name in x, object_methods)
     92      new_methods = list(filter(
     93          lambda x: 'new_'+object_name in x, object_methods))
    9194      if len(new_methods) > 1:
    9295          write_msg("-- WARNING: more than one new method for", object_name)
     
    99102              write_msg(method)
    100103
    101       del_methods = filter(lambda x: 'del_'+object_name in x, object_methods)
     104      del_methods = list(filter(
     105          lambda x: 'del_'+object_name in x, object_methods))
    102106      if len(del_methods) > 1:
    103107          write_msg("-- WARNING: more than one del method for", object_name)
     
    107111          write_msg("-- WARNING: no del method for", object_name)
    108112
    109       do_methods = filter(lambda x: object_name+'_do' in x, object_methods)
     113      do_methods = list(filter(
     114          lambda x: object_name+'_do' in x, object_methods))
    110115      if len(do_methods) > 1:
    111116          pass
     
    136141      other_methods = filter(lambda x: x not in get_methods, other_methods)
    137142      other_methods = filter(lambda x: x not in set_methods, other_methods)
     143      other_methods = list(other_methods)
    138144
    139145      if len(other_methods) > 0:
Note: See TracChangeset for help on using the changeset viewer.