Python help

For questions about using Classic.

Post » Sun Sep 18, 2011 6:42 am

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\ is right there.

What am I missing? It's driving me nuts.
Posts: 39
Reputation: 1,128

Post » Tue May 14, 2013 11:25 pm

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("")]
- 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:

Cheers!bitworks2013-05-14 23:26:41
Posts: 28
Reputation: 435

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests