On 20 April 2017 at 17:59, Grant Edwards <grant.b.edwa...@gmail.com> wrote: > On 2017-04-20, Mikhail V <mikhail...@gmail.com> wrote: >> Quite often I need raw string literals for concatenating console commands. >> I want to input them exactly as they are in python sources. >> >> There is r"" string, but it is obviously not enough because e.g. this: >> s = r"ffmpeg -i "\\server-01\D\SER_Bigl.mpg" " > > s = r'ffmpeg -i "\\server-01\D\SER_Bigl.mpg" ' > > Does that do what you want? >
Yes but it still needs to watch out if there is no ' inside or vice versa with " characters if use r"". I would like a universal solution. -- https://mail.python.org/mailman/listinfo/python-list