Getting the module to not error on startup in Python 2 or Python 3.
This commit is contained in:
parent
256494807f
commit
afd57b5bdb
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
.idea/
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
temp/
|
temp/
|
||||||
|
.vscode/
|
||||||
|
|
|
@ -5,7 +5,14 @@
|
||||||
import imp, os, sys, tempfile
|
import imp, os, sys, tempfile
|
||||||
import FreeCAD, FreeCADGui
|
import FreeCAD, FreeCADGui
|
||||||
from PySide import QtGui, QtCore
|
from PySide import QtGui, QtCore
|
||||||
import ExportCQ, ImportCQ
|
try:
|
||||||
|
import ExportCQ
|
||||||
|
except:
|
||||||
|
from . import ExportCQ
|
||||||
|
try:
|
||||||
|
import ImportCQ
|
||||||
|
except:
|
||||||
|
from . import ImportCQ
|
||||||
import module_locator
|
import module_locator
|
||||||
import Settings
|
import Settings
|
||||||
import Shared
|
import Shared
|
||||||
|
|
282
CadQuery_rc.py
282
CadQuery_rc.py
|
@ -2,16 +2,286 @@
|
||||||
|
|
||||||
# Resource object code
|
# Resource object code
|
||||||
#
|
#
|
||||||
# Created: Sat Mar 10 22:53:44 2018
|
# Created: Tue Jun 12 00:12:45 2018
|
||||||
# by: The Resource Compiler for PySide (Qt v4.8.4)
|
# by: The Resource Compiler for PySide2 (Qt v5.9.1)
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from PySide import QtCore
|
try:
|
||||||
|
from PySide2 import QtCore
|
||||||
|
except:
|
||||||
|
from PySide import QtCore
|
||||||
|
|
||||||
|
qt_resource_data = b"\
|
||||||
|
\x00\x00\x0f}\
|
||||||
|
<\
|
||||||
|
?xml version=\x221.\
|
||||||
|
0\x22 encoding=\x22UTF\
|
||||||
|
-8\x22 standalone=\x22\
|
||||||
|
no\x22?>\x0a<!-- Creat\
|
||||||
|
ed with Inkscape\
|
||||||
|
(http://www.ink\
|
||||||
|
scape.org/) -->\x0a\
|
||||||
|
\x0a<svg\x0a xmlns:d\
|
||||||
|
c=\x22http://purl.o\
|
||||||
|
rg/dc/elements/1\
|
||||||
|
.1/\x22\x0a xmlns:cc\
|
||||||
|
=\x22http://creativ\
|
||||||
|
ecommons.org/ns#\
|
||||||
|
\x22\x0a xmlns:rdf=\x22\
|
||||||
|
http://www.w3.or\
|
||||||
|
g/1999/02/22-rdf\
|
||||||
|
-syntax-ns#\x22\x0a \
|
||||||
|
xmlns:svg=\x22http:\
|
||||||
|
//www.w3.org/200\
|
||||||
|
0/svg\x22\x0a xmlns=\
|
||||||
|
\x22http://www.w3.o\
|
||||||
|
rg/2000/svg\x22\x0a \
|
||||||
|
xmlns:sodipodi=\x22\
|
||||||
|
http://sodipodi.\
|
||||||
|
sourceforge.net/\
|
||||||
|
DTD/sodipodi-0.d\
|
||||||
|
td\x22\x0a xmlns:ink\
|
||||||
|
scape=\x22http://ww\
|
||||||
|
w.inkscape.org/n\
|
||||||
|
amespaces/inksca\
|
||||||
|
pe\x22\x0a width=\x2226\
|
||||||
|
.731115mm\x22\x0a he\
|
||||||
|
ight=\x2224.375559m\
|
||||||
|
m\x22\x0a viewBox=\x220\
|
||||||
|
0 94.71655 86.3\
|
||||||
|
7009\x22\x0a id=\x22svg\
|
||||||
|
5495\x22\x0a version\
|
||||||
|
=\x221.1\x22\x0a inksca\
|
||||||
|
pe:version=\x220.91\
|
||||||
|
r13725\x22\x0a sodi\
|
||||||
|
podi:docname=\x22ca\
|
||||||
|
dquery_logo_dark\
|
||||||
|
.svg\x22>\x0a <defs\x0a \
|
||||||
|
id=\x22defs5497\
|
||||||
|
\x22 />\x0a <sodipodi\
|
||||||
|
:namedview\x0a \
|
||||||
|
id=\x22base\x22\x0a p\
|
||||||
|
agecolor=\x22#fffff\
|
||||||
|
f\x22\x0a borderco\
|
||||||
|
lor=\x22#666666\x22\x0a \
|
||||||
|
borderopacity\
|
||||||
|
=\x221.0\x22\x0a inks\
|
||||||
|
cape:pageopacity\
|
||||||
|
=\x220.0\x22\x0a inks\
|
||||||
|
cape:pageshadow=\
|
||||||
|
\x222\x22\x0a inkscap\
|
||||||
|
e:zoom=\x224.370936\
|
||||||
|
2\x22\x0a inkscape\
|
||||||
|
:cx=\x2247.358275\x22\x0a\
|
||||||
|
inkscape:cy\
|
||||||
|
=\x2243.185045\x22\x0a \
|
||||||
|
inkscape:docum\
|
||||||
|
ent-units=\x22px\x22\x0a \
|
||||||
|
inkscape:cur\
|
||||||
|
rent-layer=\x22laye\
|
||||||
|
r1\x22\x0a showgri\
|
||||||
|
d=\x22false\x22\x0a f\
|
||||||
|
it-margin-top=\x220\
|
||||||
|
\x22\x0a fit-margi\
|
||||||
|
n-left=\x220\x22\x0a \
|
||||||
|
fit-margin-right\
|
||||||
|
=\x220\x22\x0a fit-ma\
|
||||||
|
rgin-bottom=\x220\x22\x0a\
|
||||||
|
inkscape:wi\
|
||||||
|
ndow-width=\x221855\
|
||||||
|
\x22\x0a inkscape:\
|
||||||
|
window-height=\x221\
|
||||||
|
056\x22\x0a inksca\
|
||||||
|
pe:window-x=\x2265\x22\
|
||||||
|
\x0a inkscape:w\
|
||||||
|
indow-y=\x2224\x22\x0a \
|
||||||
|
inkscape:windo\
|
||||||
|
w-maximized=\x221\x22 \
|
||||||
|
/>\x0a <metadata\x0a \
|
||||||
|
id=\x22metadata\
|
||||||
|
5500\x22>\x0a <rdf:\
|
||||||
|
RDF>\x0a <cc:W\
|
||||||
|
ork\x0a rdf\
|
||||||
|
:about=\x22\x22>\x0a \
|
||||||
|
<dc:format>im\
|
||||||
|
age/svg+xml</dc:\
|
||||||
|
format>\x0a \
|
||||||
|
<dc:type\x0a \
|
||||||
|
rdf:resource\
|
||||||
|
=\x22http://purl.or\
|
||||||
|
g/dc/dcmitype/St\
|
||||||
|
illImage\x22 />\x0a \
|
||||||
|
<dc:title /\
|
||||||
|
>\x0a </cc:Wor\
|
||||||
|
k>\x0a </rdf:RDF\
|
||||||
|
>\x0a </metadata>\x0a\
|
||||||
|
<g\x0a inksca\
|
||||||
|
pe:label=\x22Layer \
|
||||||
|
1\x22\x0a inkscape\
|
||||||
|
:groupmode=\x22laye\
|
||||||
|
r\x22\x0a id=\x22laye\
|
||||||
|
r1\x22\x0a transfo\
|
||||||
|
rm=\x22translate(-2\
|
||||||
|
84.0703,-477.748\
|
||||||
|
59)\x22>\x0a <path\x0a\
|
||||||
|
inkscape:\
|
||||||
|
connector-curvat\
|
||||||
|
ure=\x220\x22\x0a s\
|
||||||
|
tyle=\x22fill:#2980\
|
||||||
|
b9;fill-opacity:\
|
||||||
|
1;fill-rule:even\
|
||||||
|
odd;stroke:#2980\
|
||||||
|
b9;stroke-width:\
|
||||||
|
3;stroke-linecap\
|
||||||
|
:butt;stroke-lin\
|
||||||
|
ejoin:round;stro\
|
||||||
|
ke-opacity:1\x22\x0a \
|
||||||
|
d=\x22m 285.57\
|
||||||
|
03,479.24859 91.\
|
||||||
|
71655,0 0,83.370\
|
||||||
|
09 -91.71655,0 z\
|
||||||
|
\x22\x0a id=\x22pat\
|
||||||
|
h4266\x22 />\x0a <g\
|
||||||
|
\x0a style=\x22f\
|
||||||
|
ont-style:normal\
|
||||||
|
;font-weight:nor\
|
||||||
|
mal;font-size:40\
|
||||||
|
px;line-height:1\
|
||||||
|
25%;font-family:\
|
||||||
|
sans-serif;lette\
|
||||||
|
r-spacing:0px;wo\
|
||||||
|
rd-spacing:0px;f\
|
||||||
|
ill:#000000;fill\
|
||||||
|
-opacity:1;strok\
|
||||||
|
e:none;stroke-wi\
|
||||||
|
dth:1px;stroke-l\
|
||||||
|
inecap:butt;stro\
|
||||||
|
ke-linejoin:mite\
|
||||||
|
r;stroke-opacity\
|
||||||
|
:1\x22\x0a id=\x22t\
|
||||||
|
ext4873\x22>\x0a \
|
||||||
|
<path\x0a d\
|
||||||
|
=\x22m 313.43298,52\
|
||||||
|
9.37701 q 2.7343\
|
||||||
|
8,0 4.44336,-1.5\
|
||||||
|
039 1.70899,-1.5\
|
||||||
|
0391 1.77735,-3.\
|
||||||
|
99903 l 9.26269,\
|
||||||
|
0 q -0.0342,3.75\
|
||||||
|
977 -2.05078,6.9\
|
||||||
|
043 -2.0166,3.11\
|
||||||
|
035 -5.53711,4.8\
|
||||||
|
5352 -3.48633,1.\
|
||||||
|
70898 -7.72461,1\
|
||||||
|
.70898 -7.92969,\
|
||||||
|
0 -12.50976,-5.0\
|
||||||
|
2441 -4.58008,-5\
|
||||||
|
.0586 -4.58008,-\
|
||||||
|
13.94532 l 0,-0.\
|
||||||
|
64941 q 0,-8.544\
|
||||||
|
92 4.5459,-13.63\
|
||||||
|
769 4.54589,-5.0\
|
||||||
|
9278 12.47558,-5\
|
||||||
|
.09278 6.93848,0\
|
||||||
|
11.1084,3.96485\
|
||||||
|
4.2041,3.93066 \
|
||||||
|
4.27246,10.49316\
|
||||||
|
l -9.26269,0 q \
|
||||||
|
-0.0684,-2.87109\
|
||||||
|
-1.77735,-4.648\
|
||||||
|
44 -1.70898,-1.8\
|
||||||
|
1152 -4.51172,-1\
|
||||||
|
.81152 -3.45214,\
|
||||||
|
0 -5.22949,2.529\
|
||||||
|
3 -1.74316,2.495\
|
||||||
|
11 -1.74316,8.13\
|
||||||
|
476 l 0,1.02539 \
|
||||||
|
q 0,5.70801 1.74\
|
||||||
|
316,8.20313 1.74\
|
||||||
|
317,2.49511 5.29\
|
||||||
|
785,2.49511 z\x22\x0a \
|
||||||
|
style=\x22f\
|
||||||
|
ont-style:normal\
|
||||||
|
;font-variant:no\
|
||||||
|
rmal;font-weight\
|
||||||
|
:bold;font-stret\
|
||||||
|
ch:normal;font-s\
|
||||||
|
ize:70px;font-fa\
|
||||||
|
mily:Roboto;-ink\
|
||||||
|
scape-font-speci\
|
||||||
|
fication:'Roboto\
|
||||||
|
Bold';fill:#fff\
|
||||||
|
fff;fill-opacity\
|
||||||
|
:1\x22\x0a id=\
|
||||||
|
\x22path4241\x22 />\x0a \
|
||||||
|
<path\x0a \
|
||||||
|
d=\x22m 333.0179\
|
||||||
|
4,517.82428 q 0,\
|
||||||
|
-8.71582 3.86231\
|
||||||
|
,-13.77441 3.896\
|
||||||
|
48,-5.0586 10.66\
|
||||||
|
406,-5.0586 5.94\
|
||||||
|
727,0 9.46777,4.\
|
||||||
|
5459 l 0.64942,-\
|
||||||
|
3.8623 8.68164,0\
|
||||||
|
0,51.20117 -9.9\
|
||||||
|
1211,0 0,-17.397\
|
||||||
|
46 q -3.41797,3.\
|
||||||
|
8623 -8.95508,3.\
|
||||||
|
8623 -6.59668,0 \
|
||||||
|
-10.52734,-5.126\
|
||||||
|
95 -3.93067,-5.1\
|
||||||
|
2695 -3.93067,-1\
|
||||||
|
4.38965 z m 9.87\
|
||||||
|
793,0.71777 q 0,\
|
||||||
|
5.29785 1.84571,\
|
||||||
|
8.06641 1.87988,\
|
||||||
|
2.76855 5.26367,\
|
||||||
|
2.76855 4.5459,0\
|
||||||
|
6.42578,-3.6230\
|
||||||
|
4 l 0,-15.27832 \
|
||||||
|
q -1.8457,-3.486\
|
||||||
|
33 -6.35742,-3.4\
|
||||||
|
8633 -3.41797,0 \
|
||||||
|
-5.29785,2.76855\
|
||||||
|
-1.87989,2.7685\
|
||||||
|
6 -1.87989,8.784\
|
||||||
|
18 z\x22\x0a s\
|
||||||
|
tyle=\x22font-style\
|
||||||
|
:normal;font-var\
|
||||||
|
iant:normal;font\
|
||||||
|
-weight:bold;fon\
|
||||||
|
t-stretch:normal\
|
||||||
|
;font-size:70px;\
|
||||||
|
font-family:Robo\
|
||||||
|
to;-inkscape-fon\
|
||||||
|
t-specification:\
|
||||||
|
'Roboto Bold';fi\
|
||||||
|
ll:#ffffff;fill-\
|
||||||
|
opacity:1\x22\x0a \
|
||||||
|
id=\x22path4243\
|
||||||
|
\x22 />\x0a </g>\x0a \
|
||||||
|
</g>\x0a</svg>\x0a\
|
||||||
|
"
|
||||||
|
|
||||||
|
qt_resource_name = b"\
|
||||||
|
\x00\x05\
|
||||||
|
\x00o\xa6S\
|
||||||
|
\x00i\
|
||||||
|
\x00c\x00o\x00n\x00s\
|
||||||
|
\x00\x0b\
|
||||||
|
\x05r\xb2\xa7\
|
||||||
|
\x00C\
|
||||||
|
\x00Q\x00_\x00L\x00o\x00g\x00o\x00.\x00s\x00v\x00g\
|
||||||
|
"
|
||||||
|
|
||||||
|
qt_resource_struct = b"\
|
||||||
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
||||||
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
|
||||||
|
\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||||
|
"
|
||||||
|
|
||||||
qt_resource_data = "\x00\x00\x0f}<?xml version=\x221.0\x22 encoding=\x22UTF-8\x22 standalone=\x22no\x22?>\x0a<!-- Created with Inkscape (http://www.inkscape.org/) -->\x0a\x0a<svg\x0a xmlns:dc=\x22http://purl.org/dc/elements/1.1/\x22\x0a xmlns:cc=\x22http://creativecommons.org/ns#\x22\x0a xmlns:rdf=\x22http://www.w3.org/1999/02/22-rdf-syntax-ns#\x22\x0a xmlns:svg=\x22http://www.w3.org/2000/svg\x22\x0a xmlns=\x22http://www.w3.org/2000/svg\x22\x0a xmlns:sodipodi=\x22http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\x22\x0a xmlns:inkscape=\x22http://www.inkscape.org/namespaces/inkscape\x22\x0a width=\x2226.731115mm\x22\x0a height=\x2224.375559mm\x22\x0a viewBox=\x220 0 94.71655 86.37009\x22\x0a id=\x22svg5495\x22\x0a version=\x221.1\x22\x0a inkscape:version=\x220.91 r13725\x22\x0a sodipodi:docname=\x22cadquery_logo_dark.svg\x22>\x0a <defs\x0a id=\x22defs5497\x22 />\x0a <sodipodi:namedview\x0a id=\x22base\x22\x0a pagecolor=\x22#ffffff\x22\x0a bordercolor=\x22#666666\x22\x0a borderopacity=\x221.0\x22\x0a inkscape:pageopacity=\x220.0\x22\x0a inkscape:pageshadow=\x222\x22\x0a inkscape:zoom=\x224.3709362\x22\x0a inkscape:cx=\x2247.358275\x22\x0a inkscape:cy=\x2243.185045\x22\x0a inkscape:document-units=\x22px\x22\x0a inkscape:current-layer=\x22layer1\x22\x0a showgrid=\x22false\x22\x0a fit-margin-top=\x220\x22\x0a fit-margin-left=\x220\x22\x0a fit-margin-right=\x220\x22\x0a fit-margin-bottom=\x220\x22\x0a inkscape:window-width=\x221855\x22\x0a inkscape:window-height=\x221056\x22\x0a inkscape:window-x=\x2265\x22\x0a inkscape:window-y=\x2224\x22\x0a inkscape:window-maximized=\x221\x22 />\x0a <metadata\x0a id=\x22metadata5500\x22>\x0a <rdf:RDF>\x0a <cc:Work\x0a rdf:about=\x22\x22>\x0a <dc:format>image/svg+xml</dc:format>\x0a <dc:type\x0a rdf:resource=\x22http://purl.org/dc/dcmitype/StillImage\x22 />\x0a <dc:title />\x0a </cc:Work>\x0a </rdf:RDF>\x0a </metadata>\x0a <g\x0a inkscape:label=\x22Layer 1\x22\x0a inkscape:groupmode=\x22layer\x22\x0a id=\x22layer1\x22\x0a transform=\x22translate(-284.0703,-477.74859)\x22>\x0a <path\x0a inkscape:connector-curvature=\x220\x22\x0a style=\x22fill:#2980b9;fill-opacity:1;fill-rule:evenodd;stroke:#2980b9;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1\x22\x0a d=\x22m 285.5703,479.24859 91.71655,0 0,83.37009 -91.71655,0 z\x22\x0a id=\x22path4266\x22 />\x0a <g\x0a style=\x22font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\x22\x0a id=\x22text4873\x22>\x0a <path\x0a d=\x22m 313.43298,529.37701 q 2.73438,0 4.44336,-1.5039 1.70899,-1.50391 1.77735,-3.99903 l 9.26269,0 q -0.0342,3.75977 -2.05078,6.9043 -2.0166,3.11035 -5.53711,4.85352 -3.48633,1.70898 -7.72461,1.70898 -7.92969,0 -12.50976,-5.02441 -4.58008,-5.0586 -4.58008,-13.94532 l 0,-0.64941 q 0,-8.54492 4.5459,-13.63769 4.54589,-5.09278 12.47558,-5.09278 6.93848,0 11.1084,3.96485 4.2041,3.93066 4.27246,10.49316 l -9.26269,0 q -0.0684,-2.87109 -1.77735,-4.64844 -1.70898,-1.81152 -4.51172,-1.81152 -3.45214,0 -5.22949,2.5293 -1.74316,2.49511 -1.74316,8.13476 l 0,1.02539 q 0,5.70801 1.74316,8.20313 1.74317,2.49511 5.29785,2.49511 z\x22\x0a style=\x22font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:70px;font-family:Roboto;-inkscape-font-specification:'Roboto Bold';fill:#ffffff;fill-opacity:1\x22\x0a id=\x22path4241\x22 />\x0a <path\x0a d=\x22m 333.01794,517.82428 q 0,-8.71582 3.86231,-13.77441 3.89648,-5.0586 10.66406,-5.0586 5.94727,0 9.46777,4.5459 l 0.64942,-3.8623 8.68164,0 0,51.20117 -9.91211,0 0,-17.39746 q -3.41797,3.8623 -8.95508,3.8623 -6.59668,0 -10.52734,-5.12695 -3.93067,-5.12695 -3.93067,-14.38965 z m 9.87793,0.71777 q 0,5.29785 1.84571,8.06641 1.87988,2.76855 5.26367,2.76855 4.5459,0 6.42578,-3.62304 l 0,-15.27832 q -1.8457,-3.48633 -6.35742,-3.48633 -3.41797,0 -5.29785,2.76855 -1.87989,2.76856 -1.87989,8.78418 z\x22\x0a style=\x22font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:70px;font-family:Roboto;-inkscape-font-specification:'Roboto Bold';fill:#ffffff;fill-opacity:1\x22\x0a id=\x22path4243\x22 />\x0a </g>\x0a </g>\x0a</svg>\x0a"
|
|
||||||
qt_resource_name = "\x00\x05\x00o\xa6S\x00i\x00c\x00o\x00n\x00s\x00\x0b\x05r\xb2\xa7\x00C\x00Q\x00_\x00L\x00o\x00g\x00o\x00.\x00s\x00v\x00g"
|
|
||||||
qt_resource_struct = "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
|
|
||||||
def qInitResources():
|
def qInitResources():
|
||||||
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
# Created by: The Resource Compiler for PyQt5 (Qt v5.5.1)
|
# Created by: The Resource Compiler for PyQt5 (Qt v5.5.1)
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from pyqode.qt import QtCore
|
from pyqode.qt import QtCore
|
||||||
|
|
||||||
qt_resource_data = b"\
|
qt_resource_data = b"\
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
# Created by: The Resource Compiler for PyQt5 (Qt v5.5.1)
|
# Created by: The Resource Compiler for PyQt5 (Qt v5.5.1)
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from pyqode.qt import QtCore
|
from pyqode.qt import QtCore
|
||||||
|
|
||||||
qt_resource_data = b"\
|
qt_resource_data = b"\
|
||||||
|
|
Loading…
Reference in New Issue
Block a user