I downloaded offline zim archives of websites such as wikipedia.com, stackoverflow.com, unix.stackexchange.com etc. and serve them via below script.

#!/usr/bin/env python3
import os
import subprocess
import sys
import threading 
from zimply import ZIMServer
ZIMServer("/home/user/zim/wikipedia_en_all_novid_2018-05.zim", index_file="/home/user/zim/wikipedia_en_all_novid_2018-05.idx", port=8790, encoding="utf-8")

it works well but when I add another line

 ZIMServer("/home/user/zim/math.stackexchange.com_eng_all_2018-08.zim",  index_file="/home/user/zim/math.stackexchange.com_eng_all_2018-08.idx", port=7890, encoding="utf-8")

it doesn't load the second ZIMServer. I think it's a python multithreading issue. How can I run both of them in the single script?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.