What skills, knowledge and talents should a junior programmer aim to obtain in order to be qualified to become a team leader? 
How does one become a leader in a team of programmers?
project management;teamwork;team leader
The best team leaders I've seen have all been dynamite programmers. But they've all had several other qualities, which are harder to define: wisdom, good judgment, good people skills (friendly and pleasant but not a pushover), dedication, commitment, and  most important of all  knowing how to give credit to others. Such people are natural leaders. The worst qualities you could cultivate are arrogance, always having to be right, always having to have the final say, being a glory hound, one-upmanship, having a huge, bruiseable ego, never admitting you're wrong, deflecting blame onto others while hogging all the credit for yourself, and, worst of all, competing with the people who work for you.