I am trying to define a name for a long server folder path below. May I know why I still get "EOL while scanning string literal" error? Many thanks.
path= (r '\\hbap.adroot.abb\HK\Finance\00210602\AMH_A2R\1KY\Drv Reengine\Python\')
I am trying to define a name for a long server folder path below. May I know why I still get "EOL while scanning string literal" error? Many thanks.
path= (r '\\hbap.adroot.abb\HK\Finance\00210602\AMH_A2R\1KY\Drv Reengine\Python\')
Its not allowed to put a space between the 'r' and the string. However i suggest just doubling the backslashes to escape them like this:
path= ("\\\\hbap.adroot.abb\\HK\\Finance\\00210602\\AMH_A2R\\1KY\\Drv Reengine\\Python\\")
Alternativly, you can just leave out the backslash at the end and do this:
path= (r"\\hbap.adroot.abb\HK\Finance\00210602\AMH_A2R\1KY\Drv Reengine\Python")
All is good, as long as you escape the backslashes and dont have the string ending with a \ (except if that ending backslash is doubled)