IAN Pattison offers a wide smile of recognition when it's pointed out the turbulent – and colourful – life of former politician Tommy Sheridan lends itself perfectly to a black comedy play, yet could be rather problematic.

This is a far cry from the writer's classic sitcom Rab C Nesbitt, in which Pattison had free rein to heighten reality until it touched the clouds. So how can he tell Sheridan's incredible true story, the rise and fall of a working-class hero, with a backdrop being the bifurcation of the socialist movement in Scotland – and make it funny?

How do you feature the significant moments of Sheridan's life – the poll tax protests, the Faslane demonstrations, his headline-grabbing court cases – and present it in a theatre form that's thought-provoking and entertaining?

"You tell a human story," says the writer of I, Tommy, which stars Des McLean, Colin McCredie, Michele Gallagher and Martin McCormick. "And that's what attracted me to it in the first place. You have this incredible tale of a man once voted the second most popular Scot ever, who if judged on popularity alone, could have gone on to become First Minister. Instead, he goes to prison.

"But attached to this personal story is the political and cultural resonance. It's important for us to ask ourselves what happened, why it happened and do we have a responsibility for what happened?"

Pattison's animated voice is a clear indicator he's as excited by the play as much as anything he's written over the years. Indeed, the next series of Nesbitt adventures was postponed to accommodate the Sheridan story.

He's entirely caught up in an understanding of how Tommy, The Cult developed: the charismatic sunbed king who had Che Guevara posters on the walls of his Pollok bedroom, who journeyed from Karl Marx to Coolio, the American rapper he met in the Big Brother House.

"It's the biggest political story in Scotland for years, from the dizzy heights of political success with six MSPs to the implosion," says Pattison. "That's hugely intriguing. And you have to consider a complete schism opened up in the left of Scottish politics which hasn't been healed."

The deconstruction of the socialist ideal, analysis of cause and causation – and morality – all provide a fascinating theatrical platform. But what device does the writer use to present the debate? "It was important to have a voice that represents the other side of the equation," he explains. "We hear Tommy's voice loud and clear but it's the character Alan (played by former Taggart star Colin McCredie) who represents the voice of the SSP.

"They were close friends and political comrades in arms. As such, I, Tommy is very much a story of friendship and how that friendship came apart."

He offers, with a wry smile: "I'd imagine most people who come to the show will have their minds made up as to which side they are on. But will they change their mind on seeing the play? Who can say?"

The play is not just about thought provocation. It's constructed in inimitable Pattison style: clever imagery, searing gags and vast swathes of black comedy. Rehearsals reveal the writer has found laughs in areas most wouldn't consider looking.

"The fun comes from Tommy's natural ebullience," he says. "It shines through every step along the way, right from the moment he first stepped upon a political platform. And such was his self-belief and conviction, he became a Messiah-like figure for the masses.

"I still had to find a voice for Tommy, but when I was introduced to Des McLean, who's been doing the definitive impressions of Tommy for years, that helped a great deal. The task has been for Des to turn this into an acting performance, and he's relishing the challenge."

Gail Sheridan is part of the fabric of the play. "How could she not be?" says Pattison. "She was stitched to Tommy's arm in every media photograph."

There's no doubt Pattison's play will be the most talked about of the year. It's zeitgeist, the Sheridan story is still being played out every day in the media, thanks to the demise of the News of the World, the Leveson Inquiry and subsequent arrests. Sheridan is of course seizing upon the hacking scandal like a dog with a juicy bone.

Will the news of the hacking arrests obfuscate the facts of the perjury conviction in the minds of the public, or will Tommy once again emerge as a working-class warrior? "It's hard to say," says Pattison. "But I'd like to think the play will make us think about the leaders we elect. Do Scots have a propensity to exalt messiahs?"

Rab C Nesbitt, like it's creator and Sheridan, emerged from Govan. Are there similarities between Rab and Tommy?

"Both Tommy and Nesbitt are larger than life with distinctive voices," he says, grinning. "If Nesbitt were sober, younger and more overtly political perhaps he'd have joined the SSP. But the difference is people like Tommy used politics as a means of elevating themselves and others up from the bottom of the heap. Rab, with his infirmities of character, was rooted there, and indeed gloried in being bottom of the pile."

What does he think Tommy will think of the play?

"He's said he'll be on holiday for the opening, but I'm sure he'll catch it at some point. He'll be curious. And whatever the content, I'm sure Tommy is big enough to come along and take it on the chin, enjoy the bits where he's lauded – and shrug off the parts he doesn't agree with. After all, he had the bottle to appear in a radio show in which his theme tune was I'm The King of the Swingers."

I, Tommy, The Gilded Balloon, Edinburgh, August 3-27.