Dealing with Office Politics
I would be the last person to get involved in office politics. Having changed few jobs in my 18 years of career, realized that every workplace stinks of politics. My earlier strategy to deal with it was to stay out of it. Take my word, it doesn't work! It is not that people want you to play politics but they do it to save themselves and hide their weaknesses.
However if this game of politics is played well for the right reasons, it can work in your favour. And you can focus on your job without stressing yourself with cleaning the shit thrown at your back.
First and foremost anticipate who can play what politics. Every person has a predictable way of playing politics (closely linked to their weak areas), you only need to observe people around you. Be an early mover and pre-empt their moves.
There are people who have big mouth but weak digestion. Use them to communicate any message you would like to spread around (all you need to tell them is not to talk about it to anyone).
Have few allies to support you, with a tacit understanding that you will do the same to them, if justified (NOT same as you scratch my back, I will scratch yours).
Sharing credit with others doesn't undermine your ego. Engage people in your goals & success, satisfy their egos if that matters to them. If you are in position to help others, go ahead & offer it.
Don't humiliate people, but stand up to them nicely, if you are not in agreement.
Don't expose your weak areas & project your strong areas as much as possible. You have to be not only the master of your area but also be jack of other areas. Try to bring informality in relationships, meeting outside the office over a drink helps in building relationships.
Another tip is to engage political people with things & ideas of non consequence to you, while you move head with big tasks without much resistance.