Ask Your Question

.getAllProperties() works in shell but not script

asked 2013-01-30 18:02:39 -0500

TTKoshi gravatar image

I'm very much a beginner, and apologize for incorrect terms. I have the following code:

from SimpleCV import Camera, Display, Image
import time

cam = Camera(0)
print ".getAllProperties() will display properties of the camera"

When I run this code line-by-line within the SimpleCV Shell.main(), I get the properties of the camera that I'm using. However, when I save the script as a python file and run it, it'll display the text and activate the camera, but not display the properties. Am I missing something in how the software interacts? I'm new to python and SimpleCV, so still learning. Many thanks to all!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-31 13:36:58 -0500

kscottz gravatar image

Get all properties returns a dict, not a string, and it does not print. I just ran this bit a code on my mac and it worked:

from SimpleCV import *

cam = Camera()
print cam.getAllProperties()
print type(cam.getAllProperties())

From the documentation:

getAllProperties(self) method of SimpleCV.Camera.Camera instance SUMMARY

Return all properties from the camera.


A dict of all the camera properties.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-30 18:02:39 -0500

Seen: 167 times

Last updated: Jan 31 '13