Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In my "small" python exe GUI program the tcl folder has 820 files (mostly tzdata). Any chance of reducing this number?

As stated in the title:; I have a "small" python exe GUI program generated by pyinstaller which creates a tcl folder that has 820 files (mostly tzdata). Any chance of reducing this number?

It takes a long time to copy the program because of all the tiny files.

Number of files in folder

I've used the datetime library. I just need the date and time to pop up on a pdf that I'm printing, so doesn't need to be that fancy. I just need the time on the computer :)

I can use "--onefile" to just get the .exe, but that takes too long to open.

Program is only for Windows atm.

like image 277
Terje Avatar asked Oct 27 '25 06:10

Terje


1 Answers

You can almost certainly delete the http1.0 and opt0.4 directories outright. They're obsolete packages included for backward compatibility only.

The *.tcl and tclIndex files should be left (except for parray.tcl, which you likely don't need).

Of the encoding, msgs and tzdata directories, if you're deploying in a restricted set of locations, you can delete a lot of that; you only need the encodings, message catalogs and timezone definitions that you actually use when running. Thus, if you're only supporting English speakers in the USA, you can delete a very large fraction of the files. (If you're not using Tcl to format or parse dates at all, you don't need any timezone definitions.) The main encoding that you must retain is the one that the scripts are written in! (NB: support for the UTF-8 and ISO8859-1 encodings, and the UTF-16-derived ones used for talking to the Windows API, are all built in directly to Tcl; you can't remove support for them.)

Which things you can remove depend on your application and where you deploy it. That's why we can't tell you outright which files to delete.

like image 174
Donal Fellows Avatar answered Oct 29 '25 21:10

Donal Fellows



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!