On Aug 8, 2009, at 11:49 AM, John wrote:

> I'm writing an article for the wiki and was wondering if the below  
> code will
> work on a Mac to find the file 'uno.py'.

        Possibly, but there are several things there that are problematic.  
First, assuming that the user has access rights to /usr is never  
smart. Second, Mac apps are typically self-contained; if uno.py is  
needed for the app, it will be contained in the Resources subdirectory  
inside the app itself, rather than installed in a system location.  
Third, you should use os.sep instead of hard-coding '/' as the path  
separator.

        Lastly, does this actually work in Linux? Doesn't os.walk  
automatically recurse? It seems that you have recursion inside of  
recursion.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to