设为首页 收藏本站
查看: 900|回复: 0

[经验分享] pyxml for python 2.6 死而复生

[复制链接]

尚未签到

发表于 2015-4-22 11:37:28 | 显示全部楼层 |阅读模式
  Pyxml是一个早在04年停止维护的项目了,只支持到2.4,我从官网上down下0.8.4版本setup.py build,结果error: Unable to find vcvarsall.bat。网上找解决办法还得下个mingw,否则就得VS2005以上的版本,这样机子上只有VC6.0的我情何以堪那。
  于是上网搜解决办法:
  这位老大告诉我:PyXML is dead project – warning: PyXML does not work with Python2.6
  http://georgik.sinusgear.com/2011/01/10/dead-project-warning-pyxml-does-not-work-with-python2-6/comment-page-1/#comment-15841
  
  有点泄气,不过可哪能放弃呢,于是继续找,终于找到一个oddguy的blog:
Windows Installer for PyXML 0.8.4 for Python 2.6.x and Python 2.7.x
  
  哇塞,太帅气了,尤其博文也写得很逗:
Rambling Version
  So you are a Windows user and you want to install Python/XML (A.K.A. PyXML), but there is no version on Sourceforge since November 2004, when Python 2.4 was all the rage. It isn’t being maintained any more.  
  So you turn to your Python friends, and they say “Oh don’t use that. There are much better XML libraries now.” And you say “But the library I want to use uses ZSI which uses PyXML, and ZSI isn’t being maintained either.”  
  And your Python friends say “ZSI? Are you using SOAP? 2001 just called and they want their over-hyped protocol stack back.” And you say “Yeah, but I need to access a server that only provides SOAP, and someone has written a wrapper layer to it which, surprise, surprise, is no longer being maintained. Besides, the whole ‘the past called’ gag is a bit dated too, isn’t it?”  
  So they say “Ah, just install it with easy_install” and you look at them funny, because you are a Windows programmer, and they are Linux programmers, and that’s not the way you do things around here.  
  Either you decide to give it a go, or you decide to download the source directly and run ‘setup.py build’, and either way it complains about ‘vcvarsall.bat’ being missing, which is its way of saying “How am I supposed to compile this C code? Don’t you have Microsoft Visual Studio installed?” to which you say “No, I am a Python programmer now! The eighties called, and asked for their C compiler back, and I gave it to them.” but it isn’t listening to you, and neither are your Linux friends, because they don’t want to associate with someone who doesn’t have a C compiler built in to the operating system.  
  Maybe you discover at this point that you can actually run a lot of ZSI without the C parts of PyXML. You can just install the non-C parts. This worked for me for almost a month, but eventually it came across some XML that needed the C code and it fell over.  
  Then you hear a rumour about a free Visual Studio command-line compiler, and a free C compiler called gcc or MINGW or something. Sounds too hard, so you yell in frustration “All I want is a nice Windows installer with pre-built binaries? Hasn’t anyone on the internet built one for me?” and your Linux friends who were pretending they couldn’t hear you finally turn around and say “Wait, you are going to run a binary you just found somewhere on the net? Are you crazy? It could have all sorts of nasty code in there.” and you just look at them funny because that’s just the way you do things around here.  
  If this is you, I have a solution! I have built the PyXML distribution, ready to just install, linked at the top and bottom of this post. If you don’t trust me (and frankly, you shouldn’t), I have provided instructions on how to do it yourself.  
  
  
  需要下载的童鞋,链接如下,感谢外国友人啊:  
  PyXML 0.8.4 for Python 2.6, Windows Installer (1,006 KB)  
  PyXML 0.8.4 for Python 2.7, Windows Installer (1,012 KB)

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-59588-1-1.html 上篇帖子: Python 模块学习 logging(2) 下篇帖子: python __setattr__, __getattr__, __delattr__, __call__
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表