There is a great website copier that I would like to bundle in my executable, created with python 3 and py2exe.
On the HTTrack official website in the FAQ section they say that there is a DLL/library version available.
But I don't know where to start, or even how to use the DLL once it would be bundled in the executable.
So how can I bundle httrack into a python 3 executable, and use its features to start copying websites?
Edit:
I found httrack-py 0.6.1 but it only supports python 2 and uses an old version of httrack, so I can't use this for my executable.

- 2,848
- 4
- 31
- 51
1 Answers
As I see it you have 2 options:
You could try to convert
httrack-py
to python 3 following these instructions, but it's usually never a good idea to work with outdated and unmaintained 3rd party library.Since the official HTTrack provides you with DLL, you can use the library directly from python 3 code. A stackoverflow question How can I use a DLL file from Python? gives an excellent answer on how to do just that.
The py2exe merely creates a windows installer which will take care of the details of installing python interpreter and your python code to the target system so that end user does not need to deal with anything else than just one .exe . This means you have to include 3rd party DLL's in the configuration - I would guess 3rd party DLL's to go into "data_files" (not tested this myself though).

- 1
- 1

- 61
- 3
-
I know how to bundle dlls into my executable, but I don't know what dll or dlls to bundle, and what functions to use in order to mirror a website. It would be helpful if you could bundle the dll yourself and try to mirror a website with it. – yuval Mar 24 '16 at 15:30
-
btw. what makes httrack a requirement? If the goal was to just copy some websites static content and set up http server to serve it, this would not require much of python code and would be portable as python. Just asking because using that dll requires reading of their documentation about the interfaces in their dll etc. e.g. to answer your question "what functions to use" requires understanding about what is it that you ultimately try to achieve. – Jason Herbburn Mar 24 '16 at 16:08