Home Download Buy Blog Forum Support

MINIDOM issues

MINIDOM issues

Postby Garii on Mon Nov 21, 2011 8:40 pm

Hey guys,

Not sure why this is happening, but when I try to import xml.dom.minidom and call parseString() on it it fails as such..

from pyexpat import *
ImportError: No module named pyexpat

Looks like it needs an XML parser?
works find in my python2.6 console. I even tried sym-linking it to sublimes python directory! No Dice
Not sure whats up with that.

I just need to parse some XML sublime! Jeez! ;)

Any help would be greatly appreciated.. Doing a big project for you PHP developers out there :)

Running Sublime Text 2 Build 2139 on Ubuntu 11.10
Garii
 
Posts: 1
Joined: Mon Nov 21, 2011 8:35 pm

Re: MINIDOM issues

Postby rmaksim on Wed Nov 30, 2011 9:56 am

And how to fix it for Linux?

Any ideas?

Interesting package https://github.com/a-sk/sublime-css-colors also generates this error. :cry:
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: MINIDOM issues

Postby wbond on Wed Nov 30, 2011 1:31 pm

If it is not bundled with the version of Python that is included with Sublime, you could always bundle it with your plugin. The only complication would be if it is not pure python, then you would need to figure out how to handle the different platforms. I believe SublimeCodeIntel has figured out how to handle native code for the various platforms, so you may want to look there.

I had to do something similar with the SFTP plugin because the version of ftplib in 2.6 doesn't appear to respect timeouts after the connection phase, which lead to issues trying to gracefully handle incorrect passive/active settings. I bundled a custom version of ftplib which I renamed to prevent conflicts with other plugins.
wbond
 
Posts: 527
Joined: Mon Feb 28, 2011 5:33 am

Re: MINIDOM issues

Postby rmaksim on Tue Dec 06, 2011 12:22 pm

in my ubuntu with default python 2.7 for some packages I did next trick:
Code: Select all
import sys
sys.path.append("/usr/lib/python2.6/lib-dynload/")

/usr/lib/python2.6/lib-dynload - in that folder is pyexpat on the local machine.
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm


Return to Plugin Development

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests