Skip to content

Video editing with Python

corrected missing DEVNULL in gif_writers

Zulko3602e74d28e4
diff --git a/README.rst b/README.rst
index 6df79196..021ed89c 100644
--- a/README.rst
+++ b/README.rst
@@ -35,6 +35,10 @@ MoviePy works on Windows, Linux and Mac OS, with Python 2 and 3. If you have tro
(sudo) pip install moviepy
+This method may fail if ``ez_setup`` is not installed on your computer. In this case install ``ez_setup`` first, with ::
+
+ (sudo) pip install ez_setup
+
**Method by hand:** download the sources, either on PyPI_ or (if you want the development version) on Github_, unzip everything in one folder, open a terminal and type ::
(sudo) python setup.py install
diff --git a/moviepy/version.py b/moviepy/version.py
index 9ad5d121..392e28e9 100644
--- a/moviepy/version.py
+++ b/moviepy/version.py
@@ -1 +1 @@
-__version__ = "0.2.1.8.11"
+__version__ = "0.2.1.8.12"
diff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.py
index 4893aed9..5cd32dfa 100644
--- a/moviepy/video/VideoClip.py
+++ b/moviepy/video/VideoClip.py
@@ -41,13 +41,6 @@ from ..decorators import (apply_to_mask,
convert_to_seconds)
-try:
- from subprocess import DEVNULL # py3k
-except ImportError:
- import os
- DEVNULL = open(os.devnull, 'wb')
-
-
class VideoClip(Clip):
"""Base class for video clips.
diff --git a/moviepy/video/io/gif_writers.py b/moviepy/video/io/gif_writers.py
index 0218cbab..bb76096f 100644
--- a/moviepy/video/io/gif_writers.py
+++ b/moviepy/video/io/gif_writers.py
@@ -6,6 +6,12 @@ from moviepy.decorators import requires_duration
from moviepy.tools import verbose_print, subprocess_call
import numpy as np
+try:
+ from subprocess import DEVNULL # py3k
+except ImportError:
+ import os
+ DEVNULL = open(os.devnull, 'wb')
+
@requires_duration
def write_gif_with_tempfiles(clip, filename, fps=None, program= 'ImageMagick',