EDIT: No, not a permissions problem. For some reason it refuses to use any wallet but my own. Can that error also happen because of a corrupted wallet or something? Here's what i'm getting, now that I've made the target file the wallet.dat file:
> pywallet.py --walletdump
WARNING:root:pycropto or libssl not found decryption may be slow
`ecdsa` package is not installed, pywallet won't be able to sign verify messages.
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
Bitcoin isn't running. I have full 777 permissions in that directory. If I rename wallet.dat to otherwallet.dat, and then run Bitcoin (to generate new wallet.dat file), then stop Bitcoin, then execute the exact same command, then it will work. Does this indicate a corrupted wallet.dat file?
Also, you may want to tell the user something before changing his wallet selection. When I went pywallet.py --walletdump --wallet=otherwallet.dat (the file I then renamed to wallet.dat) it just walletdumped wallet.dat because it couldn't read otherwallet.dat or something. That managed to confuse me a bit.