python - 如果我的一个程序在 python 2.4 中运行,但导入了一些需要 python 2.5 的东西怎么办?

标签 python linux unix

那我该如何导入呢?我在 python 2.4 中运行所有内容,但我的脚本之一导入 xml.etree.ElementTree ...这只是 Python 2.5

最佳答案

考虑升级到 Python 2.5(或者,我敢说,2.6!-)这几十年之一... the times, they are a'changin' !同时,特别是对于 ElementTree,您可能会设法 back-patch它,但是……

Come gather 'round people
Wherever you roam
And admit that the waters
Around you have grown
And accept it that soon
You'll be drenched to the bone.
If your time to you
Is worth savin'
Then you better start swimmin'
Or you'll sink like a stone
For the times they are a-changin'.

如果在 great music 中听到它帮助你,随意......但你最好开始游泳',否则你会像石头一样下沉......!-)

关于python - 如果我的一个程序在 python 2.4 中运行,但导入了一些需要 python 2.5 的东西怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1713398/

相关文章:

Python点击传递未指定数量的kwargs

python - 如果路径是文件或目录 (Python)

python - 在 Unix 上安装 Python 设置工具以运行适用于 Python 的 Tweepy Twitter 客户端

linux - Chromebook chroot crouton 同时运行多个 linux 实例

linux - 目标文件的 objdump 输出中的标志

linux - 在 unix 中查找和删除

c - C宏中参数的变量号

python - eb : The term 'eb' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序

python - 当 value 是 cls 的实例时,您可以注释返回类型吗?

linux - linux 服务器的 tcl 中不同数量的变量名和字段说明符错误