Skip to content

Commit

Permalink
update import behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
skvark committed Aug 12, 2017
1 parent 01cf0c2 commit 3140bce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cv2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import sys
import os
import importlib

# FFMPEG dll is not found on Windows without this
# FFmpeg dll is not found on Windows without this
os.environ["PATH"] += os.pathsep + os.path.dirname(os.path.realpath(__file__))

from . import cv2
sys.modules['cv2'] = cv2
# make IDE's (PyCharm) autocompletion happy
from .cv2 import *

# wildcard import above does not import "private" variables like __version__
# this makes them available
globals().update(importlib.import_module('cv2.cv2').__dict__)

0 comments on commit 3140bce

Please sign in to comment.