Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #274 #275

Merged
2 commits merged into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))