forked from vkbo/novelWriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnovelWriter.py
executable file
·45 lines (38 loc) · 914 Bytes
/
novelWriter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
try:
import PyQt5.QtWidgets
import PyQt5.QtGui
import PyQt5.QtCore
except:
print("ERROR: Failed to load dependency python3-pyqt5")
exit(1)
try:
import PyQt5.QtSvg
except:
print("ERROR: Failed to load dependency python3-pyqt5.qtsvg")
exit(1)
try:
import lxml
except:
print("ERROR: Failed to load dependency python3-lxml")
exit(1)
try:
import appdirs
except:
print("ERROR: Failed to load dependency python3-appdirs")
exit(1)
spellPack = None
try:
import enchant
spellPack = "enchant"
except:
print("WARNING: No spell check library found.")
print("Please install python3-enchant if you want to use spell checking")
if __name__ == "__main__":
import nw
inArgs = sys.argv[1:]
if spellPack is not None:
inArgs.append("--spell=%s" % spellPack)
nw.main(inArgs)