[Sugar-devel] Read-only access to thumb drive forbidden by Rainbow?
Jim Simmons
nicestep at gmail.com
Fri Aug 28 22:19:06 EDT 2009
As I have mentioned in this list before, I am trying to make View
Slides able to get pictures that may or may not be in the Journal and
add them to a slide presentation. Under .82 objects in thumb drives
can be listed using the Data Store API, which was fine. In .84 you
cannot do that any more, but I was led to believe that if I just
wanted to READ these files that Python IO would work. So I use this
code:
valid_endings = ('.jpg', '.jpeg', '.JPEG', '.JPG', '.gif',
'.GIF', '.tiff', '.TIFF', '.png', '.PNG')
for dirname, dirnames, filenames in os.walk('/media'):
for filename in filenames:
if filename.endswith(valid_endings):
iter = self.ls_right.append()
jobject_wrapper = JobjectWrapper()
jobject_wrapper.set_file_path(os.path.join(dirname, filename))
self.ls_right.set(iter, COLUMN_IMAGE, filename)
self.ls_right.set(iter, COLUMN_PATH, jobject_wrapper)
Now this code runs just fine on the Sugar test environment of Fedora
11 (.84) and Fedora 10 (.82). However, if I try running the same code
on my XO, currently running .82, the Activity does not even finish
coming up. Using the Log Activity does not give me any useful
messages. I can only suspect that Rainbow is the culprit here,
although I'm not getting any actual messages that say that. It's just
a guess on my part.
In the code above the jobject_wrapper is a class I created so that my
table column could hold an object that would return a file path,
either by getting it from a wrapped journal object or from a path
supplied by the code above. Works fine in my test environment, but
bails out on my XO.
Does anyone have any ideas? Thanks,
James Simmons
More information about the Sugar-devel
mailing list