Skip to content

Commit

Permalink
Merge pull request #275 from nad2000/master
Browse files Browse the repository at this point in the history
Fix for #274
  • Loading branch information
bearney74 committed Mar 13, 2017
2 parents e64e75b + 6a395cc commit 0b40803
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
14 changes: 5 additions & 9 deletions moviepy/audio/fx/all/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
audio_clip = afx.volume_x(some_clip, .5)
"""

import os
import pkgutil
import moviepy.audio.fx as fx

directory = os.path.dirname(
os.path.dirname(
os.path.realpath(__file__)))

files = os.listdir(directory)
fx_list = [f for f in files if ( f.endswith('.py') and not f.startswith('_'))]
__all__ = [c[:-3] for c in fx_list]
__all__ = [name for _, name, _ in pkgutil.iter_modules(
fx.__path__) if name != "all"]

for name in __all__:
exec("from ..%s import %s"%(name,name))
exec("from ..%s import %s" % (name, name))
19 changes: 6 additions & 13 deletions moviepy/video/fx/all/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@
clip = vfx.mirror_x(some_clip)
"""

import os
import pkgutil
import moviepy.video.fx as fx

__all__ = [name for _, name, _ in pkgutil.iter_modules(
fx.__path__) if name != "all"]

_directory = os.path.dirname(
os.path.dirname(
os.path.realpath(__file__)))

_files = os.listdir(_directory)
_fx_list = [_f for _f in _files if ( _f.endswith('.py') and
not _f.startswith('_'))]

__all__ = [_c[:-3] for _c in _fx_list]

for _name in __all__:
exec("from ..%s import %s"%(_name,_name))
for name in __all__:
exec("from ..%s import %s" % (name, name))

0 comments on commit 0b40803

Please sign in to comment.