No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I've been trying to modify a function and every attempt seem to screw up the plist. [CODE]def removeItem(pl, item_name): for dock_item in pl['persistent-apps']: if dock_item['tile-data']['file-label'] == item_name: verboseOutput('found', item_name) pl['persistent-apps'].remove(dock_item) return True for dock_item in pl['persistent-others']: if dock_item['tile-data']['file-label'] == item_name: verboseOutput('found', item_name) pl['persistent-others'].remove(dock_item) return True return False [/CODE] This scans … | |
I'm trying to mod a python script that reads the OS X Dock plist. I've never seen python code before this and I can't seem to figure out if I'm encountering a formatting error or a syntax error or both... Here is the original code snippet, which returns a formatted … |