Since June 2017, the Schengen group of nations has encouraged Ukrainians to make short visits to the Schengen area without any need for a visa — all part of the EU’s policy of supporting pro-western elements in Ukraine’s fragmented political landscape. That modest tweak in the visa regime has led to improved rail services across Ukraine’s western borders, so making it very much easier to reach Lviv from neighbouring Poland and Hungary. Cast back just two years, and there was just one train a day to Lviv from Przemyśl, a Polish city just 80 kilometres west of Lviv. That sole train left Przemyśl at four in the morning and terminated in Lviv, meaning that passengers heading deeper into Ukraine needed to change in Lviv for onward travel.
How things have changed, for as of July 2018 there are now many more trains from Przemyśl to Lviv; take your pick from four daytime services leaving the Polish city at civilised hours (ie. between 08.00 and 18.30).