The rise and fall of Tommy Sheridan, the controversial Scottish politician, is to be turned into a "tragi-comedy" by the creator of Rab C Nesbitt.
But I, Tommy, which receives its premiere at the Edinburgh Fringe Festival, is facing a last-minute rewrite following the charging of Andy Coulson with perjury.
Des McLean plays the title role in Ian Pattison's drama, which examines the firebrand socialist's brief reign as Scotland's most popular politician and the MSP's hubristic fall, culminating in a three-year jail sentence for committing perjury during his defamation case against the News of the World.
Pattison's play will recreate the "magical world of fluffy handcuffs, lies and swingers' clubs" referred to in evidence during the court case over the tabloid's claims that Sheridan was an adulterer.
But Strathclyde Police has thrown a spanner in the works following the arrest of Coulson, the Prime Minister's former head of communications, on charges that he lied under oath about his knowledge of phone hacking at the News of the World, when he gave evidence at Sheridan's perjury trial. The former tabloid editor said he would "vigorously contest" the charges.
Pattison told The Independent: "Andy Coulson is referenced in the play. We're waiting to see if it's going to court. Depending on what happens there may have to be some tweaking."
I, Tommy, staged at the Gilded Balloon, will follow Sheridan, 48, on a journey from "Karl Marx to Coolio", a reference to his 2009 appearance on Celebrity Big Brother alongside the rapper. Pattison said: "It's a human story as much as political.
"The story goes back more than 20 years, from when Tommy is fighting the poll tax."
Sheridan, the former Scottish Socialist Party leader, was released from jail in January this year after serving one year of his sentence and vowed to continue the fight to clear his name.The politician is aware of the stage portrayal. "I met him once and he questioned me about the play," Pattison said. "I'll invite him to the festival. It would be nice if he comes along."
Politics and the media under the glare of the Leveson Inquiry are prominent targets at this year's Edinburgh Fringe. A new play, Coalition, set in 2014, imagines a scenario in which the Conservative Prime Minister and his Liberal Democrat Deputy haven't spoken for months.
The Election: A Silent Comedy charts the final hours of a doomed political campaign.
Rich Peppiatt, the former Daily Star reporter who gave evidence against his former bosses at Leveson, will appear in his own one-man show, One Rogue Reporter, at the Pleasance Courtyard.