Works for both dropbox 0.7.x, 0.8.x and 1.0.x and on all platforms (Windows / Mac / Linux)
Download here: http://dl.dropbox.com/u/340607/pyDropboxValues.py
For Python < 2.6 Users: http://pastebin.com/eKymSQ1w
Place pyDropboxValues.py somewhere on your $PATH, make it executable, and then run it in a terminal / DOS window.
It will print a big list of all the config keys, and their values.
- Get the value for just one config key, e.g.
- Print out all available config keys (the little u at the front of each just means they’re Unicode strings – you can simply ignore it)
- Print the location of the user’s Dropbox folder (not always stored in the config database)
- Print a URL suitable for use in Text Based Linux Install
- Backup your config database (so you can restore it, if you accidentally break it)
- Display the ‘raw’ undecoded values
- Display the ‘special’ options accepted by this command
- If you want, you can do
from pyDropboxValues import *
in your own Python script, and then you have access to the functions GetConfigDbDirectory, GetConfigDbFilename, GetDbConnection, GetDbVersion, GetDbKeys, ReadDbValue, WriteDbValue, DeleteDbValue, & GetDropboxLocation (hopefully the usage is fairly straightforward, see Switch Proxy Settings for an example) – I’m not sure of the re-use license of my code because it borrows so much from the two scripts mentioned below, and neither of those specify a license.
SyntaxError: invalid syntax
If you are using Python 2.5 or earlier maybe you will get this error.
File "./pyDropboxValues.py", line 213 except Exception as detail: ^ SyntaxError: invalid syntax
For fix this you must upgrade your python version to 2.6 or greater (or see the link near the top of this page).
As a developer and tinkerer I really liked the functionality provided by Python Script to Display Dropbox Client Configuration Data but unfortunately it doesn’t work once you’ve upgraded your dropbox client to the 0.8.x builds… I’d also seen some people say that it sometimes didn’t work properly on Linux.
…so I fixed both these problems by taking the best bits of Python Script to Display Dropbox Client Configuration Data and the best bits of pyDropboxPath to create this script!
Like pyDropboxPath, it seamlessly works on all operating systems and with all dropbox versions; and like Python Script to Display Dropbox Client Configuration Data it simply prints out all the configuration values stored in the dropbox config database.