0

I would like to call markdown.markdown function from Google App Engine. I have both markdown and pygments installed in modules folder.

import modules.markdown as markdown
import modules.pygments as pygments

unistring = u'my string'

markdown.markdown(unistring, extensions=['codehilit'])

I get the following error:

 File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: Failed loading extension 'codehilite' from 'codehilite', 'markdown.extensions.codehilite' or 'mdx_codehilite'

It seems that it searches for the module in the the main librarty folder of GAE. Any idea how to point it to where the pygments folder is really stored(modules.pygments)

LLaP
  • 2,528
  • 4
  • 22
  • 34

1 Answers1

1

You can use any pure Python third party libraries in your Google App Engine application. In order to use a third party library, simply include the files in your application's directory, and they will be uploaded with your application when you deploy it to our system. You can import the files as you would any other Python files with your application.

Just create markdown and pygments symlinks in your application's directory pointing to the given libraries.

pgiecek
  • 7,970
  • 4
  • 39
  • 47