My overall project involves me attempting to use python 3.4 to update my Cisco Jabber status with my the current song I'm playing in Spotify. This is on win 7 for my work laptop.
I was first attempting to get the feel for a good python library that will allow me to change my Jabber status, and I read http://xmpppy.sourceforge.net/ here that xmpppy might be what I'm looking for. Pip wasn't recognizing xmpppy, so I downloaded the library from that website and used python.exe setup.py install in the unzipped folder (from the download) to install. I felt the install went successfully.
However, attempting to import xmpp (the folder that was installed in site-packages was called just xmpp), leaves this error:
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
import xmpp
File "C:\Python34\lib\site-packages\xmpppy-0.5.0rc1-py3.4.egg\xmpp\__init__.py", line 29, in <module>
import simplexml,protocol,debug,auth,transports,roster,dispatcher,features,browser,filetransfer,commands
ImportError: No module named 'debug'
In the xmpp folder, I can see simplexml.py, protocol.py, debug.py, etc, but the shell is not loading them with the import.
Is there something more I should be using in my import statement to ensure the modules are loaded? Do I perhaps have them located in the wrong place?
And a bonus question, is there a better library for the job?
Thank you for your help.
Have you tried
from xmpp import debug? Or you couldimport <module>; print <module>.__file__to see if the library is in the right python version not in python2.7?Since only
import debugmeans you have a library called debug, but seems your problem is trying to importdebugfromxmppmodule.In addition, to the question for a better library
it depends on your requirement of your project, there are other library like
Wokkel, twisted, tornado, Sleekxmppmight able to do the work. However, you might need to spend more time to understand their architecture,xmpppycould gives you a simple implementation without spend too much time on understanding their structure.Hope it helps.