← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #272186]: double backslashes in printed strings --- is by convention (a \ must be escaped with a \ )

 

Question #272186 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272186

    Status: Open => Answered

RaiMan proposed the following answer:
if you go back to my recommendation at comment #3, then vital things you
did might be:

import codecs
data = u"c:\SikuliX\依頼分\sikuli.funcあ.txt".encode("utf-8") # no idea, why that should be needed in IDE
dir = os.path.dirname(data)
uprint("*** content of " + dir)
for fname in os.listdir(dir):
  uprint(fname)
uprint("*** content of " + data)
ftxt = codecs.open(data,"r","shift_jis")
for line in ftxt.readlines():
  uprint(line.strip())

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.