Allow execution of scripts even if lt package is not installed

This commit is contained in:
Piero Toffanin 2023-01-13 10:21:07 -05:00
parent 230eee1490
commit cfe904dfe2
3 changed files with 5 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from babel.messages.frontend import main as pybabel
if __name__ == "__main__":

View file

@ -1,4 +1,7 @@
#!/usr/bin/env python
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import argparse
from libretranslate.init import check_and_install_models

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import re
import polib
import json