user196: I have somewhere in my hard disks some copies of old wallets which I need to analyse.
My idea was importing them into blockchain.info, but to do that apparently you need to dump them with pywallet.py, which is one of the worst pieces of software I've recently put my hands on.
Is there an alternative?
I.e. either one software which given (via command line) the full path of the file, will dump something that blockchain.info can import, or something that at least given a wallet (again, full path via command line) will dump all the private keys.
PS: this has to work for encrypted wallets too, asking the password either at runtime (would be better) or at the command line.

user1307: Beside that I don't understand your problem with PyWaller, like Eyal suggests, you can use the standard Bitcoin software for this as well, although this method will be a little more time-consuming.
I suggest doing the following for every wallet.dat file you have:

Backup your current wallet.dat file.
Copy the old wallet.dat to your Bitcoin directory.
Open up a terminal and run the bitcoind daemon:
bitcoind -daemon
Retrieve a list of all the addresses in the wallet: 
bitcoind listaddressgroupings
For every address you want the private key from, dump it:
bitcoind dumpprivkey <bitcoinaddress>
Stop the daemon before changing the wallet.dat file:
bitcoind stop

This should give you all the private keys you need and you can import them to any wallet you would like.

user4193: I hate to be that guy, but you should really take another look at pywallet.  Your problems may be specific to Joric's pywallet, which hasn't been updated in awhile.  There is a better-maintained fork of pywallet by JackJack. 
If this was the version of it that you already experienced, you could always try the web interface by running:./pywallet.py --web and then navigating to localhost:8989/ in a web browser. 
You did however request a command line way of doing it, which with jackjack's pywallet would look like this: 
./pywallet.py --dumpwallet  --datadir=DATADIR --wallet=WALLETFILE --passphrase=PASSPHRASE 
The --passphrase option may have been the issue you ran into with pywallet, since it is necessary for dealing with encrypted wallets, but it isn't in the readme (not really sure why that is).
Anyway, pywallet really does seem to be your best bet for what you're trying to do.  If you are having issues using it, feel free to include information about these issues.

user4384: 
"As I thought, it doesn't work that way. It wants a full directory with the databases, an alone wallet.dat is not enough. – Lohoris yesterday" Not at all... Wallet.dat is the only file that pywallet reads
If you notice a bug, it's rather nice to report it to the dev instead of bashing him
Same thing for new flags you might want: ask for them instead of complain about their absence

https://bitcointalk.org/index.php?topic=34028.180
I can also provide an email address if you don't have a bitcointalk account

user27773: This is an old question but just to say that the dumpwallet command has been added to bitcoin core. This will give you all the private keys in a text format.

196: <p>I have somewhere in my hard disks some copies of old wallets which I need to analyse.</p>

<p>My idea was importing them into blockchain.info, but to do that apparently you need to dump them with pywallet.py, which is one of the worst pieces of software I've recently put my hands on.</p>

<p>Is there an alternative?</p>

<p>I.e. either one software which given (via command line) <strong>the full path of the file</strong>, will dump something that blockchain.info can import, or something that at least given a wallet (again, full path via command line) will dump all the private keys.</p>

<p>PS: this has to work for encrypted wallets too, asking the password either at runtime (would be better) or at the command line.</p>
 1307: <p>Beside that I don't understand your problem with PyWaller, like Eyal suggests, you can use the standard Bitcoin software for this as well, although this method will be a little more time-consuming.</p>

<p>I suggest doing the following for every <code>wallet.dat</code> file you have:</p>

<ol>
<li>Backup your current <code>wallet.dat</code> file.</li>
<li>Copy the old <code>wallet.dat</code> to your Bitcoin directory.</li>
<li><p>Open up a terminal and run the bitcoind daemon:</p>

<p><code>bitcoind -daemon</code></p></li>
<li><p>Retrieve a list of all the addresses in the wallet: </p>

<p><code>bitcoind listaddressgroupings</code></p></li>
<li><p>For every address you want the private key from, dump it:</p>

<p><code>bitcoind dumpprivkey &lt;bitcoinaddress&gt;</code></p></li>
<li><p>Stop the daemon before changing the wallet.dat file:</p>

<p><code>bitcoind stop</code></p></li>
</ol>

<p>This should give you all the private keys you need and you can import them to any wallet you would like.</p>
 4193: <p>I hate to be <em>that</em> guy, but you should really take another look at pywallet.  Your problems may be specific to <a href="https://github.com/joric/pywallet" rel="nofollow noreferrer">Joric's</a> pywallet, which hasn't been updated in awhile.  There is a better-maintained <a href="https://github.com/jackjack-jj/pywallet" rel="nofollow noreferrer">fork</a> of pywallet by JackJack. <br />
If this was the version of it that you already experienced, you could always try the web interface by running:<code>./pywallet.py --web</code> and then navigating to localhost:8989/ in a web browser. <br />
You did however request a command line way of doing it, which with jackjack's pywallet would look like this: <br />
<code>./pywallet.py --dumpwallet  --datadir=DATADIR --wallet=WALLETFILE --passphrase=PASSPHRASE</code> <br />
The <code>--passphrase</code> option may have been the issue you ran into with pywallet, since it is necessary for dealing with encrypted wallets, but it isn't in the <a href="https://github.com/jackjack-jj/pywallet/blob/master/README" rel="nofollow noreferrer">readme</a> (not really sure why that is).<br/>
Anyway, pywallet really does seem to be your best bet for what you're trying to do.  If you are having issues using it, feel free to include information about these issues.</p>
 4384: <ol>
<li>"As I thought, it doesn't work that way. It wants a full directory with the databases, an alone wallet.dat is not enough. – Lohoris yesterday" Not at all... Wallet.dat is the only file that pywallet reads</li>
<li>If you notice a bug, it's rather nice to report it to the dev instead of bashing him</li>
<li>Same thing for new flags you might want: ask for them instead of complain about their absence</li>
</ol>

<p><a href="https://bitcointalk.org/index.php?topic=34028.180" rel="nofollow">https://bitcointalk.org/index.php?topic=34028.180</a>
I can also provide an email address if you don't have a bitcointalk account</p>
 27773: <p>This is an old question but just to say that the dumpwallet command has been added to bitcoin core. This will give you all the private keys in a text format.</p>
