简体   繁体   English

将python27.dll复制为python25.dll

[英]Duplicating python27.dll as python25.dll

I have some Windows proprietary apps that insist on using Python 2.5. 我有一些Windows专有应用程序坚持使用Python 2.5。 I'm already using python 2.7 rarely and on my way to 3.x, so I do not want to keep or force the team to keep yet another python version. 我已经很少使用python 2.7了,并且在升级到3.x的途中,所以我不想保留或强迫团队保留另一个python版本。

So, I cheated and created a python25.dll as a copy of the python27.dll in the same bin folder of that app/ Some initial tests prove it is actually working. 因此,我作弊并在该应用程序的同一bin文件夹中创建了一个python25.dll作为python27.dll的副本/一些初步测试证明它确实有效。

My question: is this going to cause much issues? 我的问题:这会引起很多问题吗? What are the differences between the two DLL's? 两个DLL之间有什么区别?

Yes, I know when updating my python, I probably need to recopy that single dll. 是的,我知道在更新python时,我可能需要重新复制该单个dll。

Any differences relevant in this context would be the symbols exported by the two DLLs. 在这方面相关的任何差异将是两个DLL导出的符号。 I am not familiar with the windows toolsuite, but try using a windows equivalent of unix's nm or objdump to see whether there are any symbols exported in the 2.5 version but not 2.7. 我对Windows工具套件不熟悉,但是尝试使用与unix的nmobjdump等效的Windows来查看在2.5版本中是否导出了任何符号,但在2.7版本中没有。 I wouldn't expect (m)any. 我什么都不会期待。

Another approach to solve your question would be to ask the vendors of the proprietary software why they request =2.5 instead of >=2.5, it may be that they have experienced some more subtle problems not directly related to the API but rather an implementation detail... 解决您的问题的另一种方法是询问专有软件的供应商为何要求= 2.5而不是> = 2.5,这可能是因为他们遇到了一些更微妙的问题,这些问题与API没有直接关系,而是实现细节。 ..

I was slightly worried that you might be talking about the software I write, but you're in a totally different country, so I doubt it. 有点担心您可能在谈论我编写的软件,但是您所处的国家完全不同,所以我对此表示怀疑。 :) :)

I can see at least 3 potential problems with this: 我至少可以看到3个潜在问题:

  1. This is almost certain to void any warrany / support agreements you have on the software. 几乎可以肯定,这会使您在该软件上拥有的所有保修/支持协议无效。 We are very cautious about any other software just running on the same server, and someone playing around with the internals would get into a lot of trouble as we go through a very expensive rebuild of the system from scratch. 我们对仅在同一服务器上运行的任何其他软件都非常谨慎,当我们从头开始对系统进行非常昂贵的重建时,内部玩弄的人会遇到很多麻烦。

  2. If the system only has bytecode for the python routines, not the source code, you may find that the system will refuse to load any pre-compiled functions, as the bytecode version will have changed. 如果系统仅具有用于python例程的字节码,而没有源代码,则您可能会发现系统将拒绝加载任何预编译的函数,因为字节码版本已更改。

  3. There may be some bugs / features in python 2.5 that they are unknowningly relying on, and this may cause unexpected changes in behaviour. python 2.5中可能存在未知依赖的一些错误/功能,这可能会导致行为方面的意外更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM