2

I'm trying to wrap pygooglevoice with a pretty C# Winform app using IronPython. I'm VERY new to python and I've overcome a few hurdles, but it looks like I need an experts eyes (or a beginners!) (or an 'expats' eyes) to assist me with this one.

 File "..\googlevoice\util.py", line 3, 
in <module> 
ImportError: cannot import expat from xml.parsers 
The actual code here is: 
from xml.parsers.expat import ParserCreate 

I get the above error when executing the IronPython ipy64.exe as follows:

ip64.exe "c:\Users\nick\Downloads\pygooglevoice-0.5\googlevoice\markasread.py

The contents of markasread.py are as follows:

from googlevoice import Voice,util 
voice = Voice() 
voice.login('emailAddr...@gmail.com', 'password here') 
while True : 
    folder = voice.search('is:unread') 
    if folder.totalSize <= 0 : 
        break 
    util.print_(folder.totalSize) 
    for message in folder.messages: 
        util.print_(message) 
        message.mark(1) 
mzjn
  • 48,958
  • 13
  • 128
  • 248

1 Answers1

1

well, seems the googlevoice api uses the expat parser, which isn't supported by IronPython.

maybe you can get it to work if you use the pyexpat from FePy instead (save it as Lib/xml/parsers/expat.py). but i don't know if that's enough to get everything to work.

mata
  • 67,110
  • 10
  • 163
  • 162