了解散布冻结的Python Tkinter应用所需的TCL中的哪些文件 [英] Understanding what files in the TCL are required for distributing frozen Python Tkinter apps

查看:60
本文介绍了了解散布冻结的Python Tkinter应用所需的TCL中的哪些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确定需要使用Python的(Python 2.6/Python 2.7)tcl文件夹中的哪些文件来分发使用Py2exe或类似文件的冻结的Python Tkinter应用程序.

I'm trying to figure out which files in Python's (Python 2.6/Python 2.7) tcl folder are required in order to distribute frozen Python Tkinter apps using Py2exe or similar.

快速而肮脏的方法(以pyexe为例)是遵循下一页的第二个示例,然后将python的tcl文件夹复制到dist文件夹(作为tcl子文件夹). http://www.py2exe.org/index.cgi/TixSetup

The quick and dirty way to do this (using pyexe as an example) is to follow the 2nd example on the following page and then xcopy your python's tcl folder to your dist folder (as a tcl sub-folder). http://www.py2exe.org/index.cgi/TixSetup

xcopy tcl技术的问题在于,它复制了100个可能不需要分发的额外文件.

The problem with the xcopy tcl technique is that it copies 100's of extra files that may not be needed for distribution.

例如,我的实验表明,冻结Python 2.7 Tkinter应用程序时可能不需要以下tcl文件夹:

For example, my experiments show that the following tcl folders may(???) not be needed when freezing Python 2.7 Tkinter applications:

注意:数字大小是每个路径中所有文件的总和.

Note: The numeric sizes are the sum of all the files in each of these paths.

  • tcl \ tcl8.5 \ encoding 1415K(删除不适用的编码?UTF-8/Unicode是否需要?)
  • tcl \ tcl8.5 \ tzdata 1450K(tcl时钟演示的时区数据?)
  • tcl \ tcl8.5 * .tcl 256K
  • tcl \ tix8.4.3 \ demos 246K
  • tcl \ tk8.5 \ demos 685K

我是在正确的道路上吗?还是不包括上述tcl内容,会在后面对我造成伤害?

Am I on the right path or will not including the above tcl content bite me in the butt down the road?

更好的是,关于Python的tcl文件夹中的文件是否有某种文档?

Even better, is there some sort of documentation regarding the files in Python's tcl folder?

谢谢你,马尔科姆

推荐答案

您不需要演示程序(我希望;如果您这样做,那就太麻烦了!),但是可能需要其他所有内容;编码用于在外部世界的字节和Tcl的字符之间进行转换,而tzdata用于进行时间处理.如果您将应用程序交付到较小的目标市场,您可以 修剪编码和tzdata –实际上,在Unix上,您可能会忽略整个tzdata,因为系统将拥有最新的日期版本–但是您应该意识到您在限制代码的可移植性.

You don't need the demos (I hope; if you do, that's gross!) but everything else is potentially required; the encodings are used to convert between the outside world's bytes and Tcl's characters, and the tzdata is used to make the time processing work. You can trim the encodings and tzdata if you are delivering the app to a small target market – indeed, on Unix you might be able to leave out the whole of tzdata because the system will have an up-to-date version – but you should be aware that you are restricting the code's portability.

这篇关于了解散布冻结的Python Tkinter应用所需的TCL中的哪些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆