1

In QPython3, a line like s = u"Hello" raises a syntax error for some reason.

I want to install a module that uses such code (namely xlwt) and therefore pip install xlwt fails.

This question is very similar but the workaround does not work since the problem is in 3rd party code.

Weirdly, the install works perfectly fine with QPython2. But I wrote all my code with Python3 features.

Does anyone know how I could get a line unicode strings to work in QPython3 ?

EDIT

I just realised QPython3 is running Python3.2 where the unicode raw strings were still banned and restored with Python3.3.

I am still looking for a workaround or a Python3.3+ interpreter for Android.

If you have an idea, I put a bounty on this question.

Community
  • 1
  • 1
Jacques Gaudin
  • 15,779
  • 10
  • 54
  • 75

1 Answers1

0

If I'm correct about this, "" is a byte string in Python 2, u"" is a Unicode string in Python 2, b"" is a byte string in Python 3, "" is a Unicode string in Python 3.

Is this the answer you want? Or I misunderstood the meaning of the question?

Kirk
  • 446
  • 4
  • 18