Python help

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I have a problem using python. I have a python script in my cap that uses xml.dom.minidom , and I get an error message when running my game:

    Traceback (most recent call last):

    File "<string>", line 2 in <module>

    ImportError: No module named xml.dom.minidom

    I got this to work before, but I had to reinstall my pc recently, and now I can't get it to work anymore.

    I have python 2.6.6 installed in c:\python6\ , and the lib\xml\dom\minidom.py is right there.

    What am I missing? It's driving me nuts.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry for bumping an old thread, just making sure that anybody who wants the solution will find as much info as they can get.

    I recently run into the "no module" ImportError, and figured out this:

    • CC comes with some of the modules preloaded in the ..CC\DATA\Python directory
    • some of it, like my base64 module are missing
    • download Python 2.6, install it, find the modules that you're lacking
    • if you have only *.py files, you have to convert them into *.pyc files (probably)
    • to do that, use Python! [import py_compile / py_compile.compile("base64.py")]
    • copy the *.pyc file (module) that you're missing into ..CC\DATA\Python directory
    • import and enjoy, should work :)

    My original problem and the extended solution: scirra.com/forum/topic67855.html.

    Cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)