OpenCV-Python cv2.CV_CAP_PROP_POS_FRAMES error
<p>Currently, I am using opencv 3.1.0, and I encountered the following error when executing the following code:</p>

<pre><code>post_frame = cap.get(cv2.CV_CAP_PROP_POS_FRAMES)
</code></pre>

<p>I got the following error Message:</p>

<p>File "videoOperation.py", line 37, in 
    pos_frame = cap.get(cv2.CV_CAP_PROP_POS_FRAMES)
AttributeError: 'module' object has no attribute 'CV_CAP_PROP_POS_FRAMES'</p>

<p>The code should be written in the following format when using OpenCV 2.x:</p>

<pre><code>post_frame = cap.get(cv2.cv.CV_CAP_PROP_POS_FRAMES)
</code></pre>

<p>From <a href="https://stackoverflow.com/questions/30013009/opencv-3-0-0-dev-python-bindings-not-working-properly">opencv 3.0.0-dev python bindings not working properly</a>, I know that </p>

<blockquote>
  <p>the cv2.cv submodule got removed in opencv3.0, also some constants were changed</p>
</blockquote>

<p>But the cv2.CV_CAP_PROP_POS_FRAMES didn't work for me, So what am I supposed to do?</p>