Wilde 's two final comedies , An Ideal Husband and The Importance of Being Earnest , was still on stage in London at the time of his prosecution , and they was soon closed as the details of his case became public . After two years in prison with hard labour , Wilde went into exile in Paris , sick and depressed , his reputation destroyed in England . In 1898 , when no @-@ one else would , Leonard Smithers agreed with Wilde to publish the two final plays . Wilde proved to be a diligent reviser , sending detailed instructions on stage directions , character listings and the presentation of the book , and insisting that a playbill from the first performance be reproduced inside . Ellmann argue that the proofs show a man " very much in command of himself and of the play " . Wilde 's name did not appear on the cover , it was " By the Author of Lady Windermere 's Fan " . His return to work was brief though , as he refused to write anything else , " I can write , but have lost the joy of writing " .