2

Simply doing...

from google.appengine.api import background_thread

...like in the official documentation, fails for me with...

<type 'exceptions.ImportError'>: cannot import name background_thread

...when calling it from my backend.

How do I get this to import properly?

pepto
  • 41
  • 2
  • Are you using the Python 2.7 or Python 2.5 runtime? – Wooble Jun 29 '12 at 15:00
  • Python 2.5... I understood from the [1.6.4. release-notes](http://googleappengine.blogspot.de/2012/03/app-engine-164-released.html) that this isn't Python 2.7 only? – pepto Jun 29 '12 at 15:35
  • 1
    Hmm; the documentation really doesn't seem to indicate that it's python2.7 only. On the other hand, your import works perfectly on shell-27.appspot.com and not on shell.appspot.com. – Wooble Jun 29 '12 at 15:36

2 Answers2

1

It's a Python 2.7 only feature. Also it's not supported in the SDK.

Guido van Rossum
  • 16,690
  • 3
  • 46
  • 49
0

It just works on Python 2.7 and it's not supported in the development server (as @Guido van Rossum says), just when you upload it on GAE servers

Raulsc
  • 75
  • 2
  • 12