Brantome is nice but quiet. I would not stay there for long. It's a little out of the way.
Sarlat la Caneda is very nice, but the market is really unpleasantly crowded, I preferred it on other days and night
Beynac, Castelnaud, and Le Roque le Gage are all very close by car, like 5 miles away from Sarlat, and very picturesque.
There are also many castles and chateaus within a 10 mile radius of Sarlat.
For example, there is Château des Milandes owned by the American singer Josephine Baker.
Belves is a Bastide which is stone village - which is interesting but not that pretty. Monpazier too is another kind of square stone village. There are a dozen other small places and none of them are lousy - they all are interesting in different ways.
There is also Les Eyzes with the 40,000 year old cave paintings.
Perigieux is a larger city with an interesting church that has a similar style to the one in Montmartre.
Carrenac is fairly far away closer to Rocamador and Les Collonges Rouge. It's a nice small place. Again there are many other small places nearby.
I also like Brive la Gaillard if you want a little bigger city like Perigieux but with better restaurants.
You can take trains to Perigeiux, Sarlat, Brive, but not many of the others.