Patrice Leconte’s new film is an elegant, amusing odd-couple divertissement that also reflects on the paths not chosen in life without getting too heavy-handed about it. The director has pointed to westerns as the ultimate inspiration for the picture, and it’s not difficult to feel the spirit of Sergio Leone hovering over the proceedings, especially in terms of its set-up; but perhaps it’s best taken as a sort of existentialist Gallic twist on the masterful Highsmith-Hitchcock “Strangers on a Train,” which so memorably had the straightlaced tennis pro played by Farley Granger exchanging murders with Robert Walker’s deliciously degenerate nabob, Bruno Anthony. In “Man on the Train,” Manesquier (Jean Rochefort), a perpetually bemused retired schoolmaster in a provincial French town, offers Milan (Johnny Hallyday), the titular recent arrival whom he bumps into at a pharmacy, a place to stay in his big, ramshackle house. Milan is a leather-jacketed, gun-toting stranger who’s as laconic and emotionally withdrawn as Manesquier is voluble and expressive, and his interest in the town’s lone bank is surely suspicious. What becomes clear as the pair interact is that both yearn to be more like the other, and over the course of a few days each learns from his new-found friend. In the end they do actually exchange identities–though in a hallucinatory way that marks this as very much an “art” film.

If you take “Man on the Train” on a purely literal level, it’s not likely to please. The story is implausible on its face, and the lead figures are more iconic creations than realistic human beings. Worse still, the picture goes off the tracks in the last reel, abandoning its relative simplicity in favor of an elaborately choreographed switch that’s too ostentatiously clever (and enigmatic) for its own good. But the quirkiness and surrealistic touches, which might have been simply precious, are made not only tolerable but pleasurable by Leconte’s austerely patrician style, Rochefort’s roguish charm and Hallyday’s deadpan authority. The interplay between the two men has a rich vein of oddball humor and occasional suggestions of poignancy, but the director and stars don’t allow it to descend into mawkishness. And while the secondary performers don’t have much opportunity to shine, there’s a running gag about the newest of Milan’s confederates that’s peculiar enough to score. As with all of Leconte’s work, the film is a delight to the eye, too, with the director’s subtlety beautifully matched by Ivan Maussion’s production design and Jean-Marie Drejou’s gorgeous widescreen photography. There’s also an pleasantly eclectic music score by Pascal Esteve which makes extensive use of both western guitar riffs and Schubert piano sonatas.

In comparison to Leconte’s other films, “Man on the Train” feels a little lightweight; perhaps that’s why he felt the need to turn up the level, not entirely successfully, at the end. But its overall stylishness, its able leads and its slyly serene sensibility keep it intriguing throughout.