Skip to content

Commit 426b59b

Browse files
committed
winpython
1 parent 822a3a4 commit 426b59b

60 files changed

Lines changed: 10316 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/lib/winpython/__init__.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
WinPython License Agreement (MIT License)
4+
-----------------------------------------
5+
6+
Copyright (c) 2012-2013 Pierre Raybaut
7+
Copyright (c) 2014-2019+ The Winpython development team https://github.com/winpython/
8+
9+
Permission is hereby granted, free of charge, to any person
10+
obtaining a copy of this software and associated documentation
11+
files (the "Software"), to deal in the Software without
12+
restriction, including without limitation the rights to use,
13+
copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following
16+
conditions:
17+
18+
The above copyright notice and this permission notice shall be
19+
included in all copies or substantial portions of the Software.
20+
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28+
OTHER DEALINGS IN THE SOFTWARE.
29+
"""
30+
31+
__version__ = '2.2.20191222'
32+
__license__ = __doc__
33+
__project_url__ = 'http://winpython.github.io/'
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtCore classes and functions.
11+
"""
12+
13+
from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
if PYQT5:
17+
from PyQt5.QtCore import *
18+
from PyQt5.QtCore import pyqtSignal as Signal
19+
from PyQt5.QtCore import pyqtSlot as Slot
20+
from PyQt5.QtCore import pyqtProperty as Property
21+
from PyQt5.QtCore import QT_VERSION_STR as __version__
22+
23+
# Those are imported from `import *`
24+
del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
25+
elif PYSIDE2:
26+
from PySide2.QtCore import *
27+
try: # may be limited to PySide-5.11a1 only
28+
from PySide2.QtGui import QStringListModel
29+
except:
30+
pass
31+
elif PYQT4:
32+
from PyQt4.QtCore import *
33+
# Those are things we inherited from Spyder that fix crazy crashes under
34+
# some specific situations. (See #34)
35+
from PyQt4.QtCore import QCoreApplication
36+
from PyQt4.QtCore import Qt
37+
from PyQt4.QtCore import pyqtSignal as Signal
38+
from PyQt4.QtCore import pyqtSlot as Slot
39+
from PyQt4.QtCore import pyqtProperty as Property
40+
from PyQt4.QtGui import (QItemSelection, QItemSelectionModel,
41+
QItemSelectionRange, QSortFilterProxyModel,
42+
QStringListModel)
43+
from PyQt4.QtCore import QT_VERSION_STR as __version__
44+
from PyQt4.QtCore import qInstallMsgHandler as qInstallMessageHandler
45+
46+
# QDesktopServices has has been split into (QDesktopServices and
47+
# QStandardPaths) in Qt5
48+
# This creates a dummy class that emulates QStandardPaths
49+
from PyQt4.QtGui import QDesktopServices as _QDesktopServices
50+
51+
class QStandardPaths():
52+
StandardLocation = _QDesktopServices.StandardLocation
53+
displayName = _QDesktopServices.displayName
54+
DesktopLocation = _QDesktopServices.DesktopLocation
55+
DocumentsLocation = _QDesktopServices.DocumentsLocation
56+
FontsLocation = _QDesktopServices.FontsLocation
57+
ApplicationsLocation = _QDesktopServices.ApplicationsLocation
58+
MusicLocation = _QDesktopServices.MusicLocation
59+
MoviesLocation = _QDesktopServices.MoviesLocation
60+
PicturesLocation = _QDesktopServices.PicturesLocation
61+
TempLocation = _QDesktopServices.TempLocation
62+
HomeLocation = _QDesktopServices.HomeLocation
63+
DataLocation = _QDesktopServices.DataLocation
64+
CacheLocation = _QDesktopServices.CacheLocation
65+
writableLocation = _QDesktopServices.storageLocation
66+
67+
# Those are imported from `import *`
68+
del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR, qInstallMsgHandler
69+
elif PYSIDE:
70+
from PySide.QtCore import *
71+
from PySide.QtGui import (QItemSelection, QItemSelectionModel,
72+
QItemSelectionRange, QSortFilterProxyModel,
73+
QStringListModel)
74+
from PySide.QtCore import qInstallMsgHandler as qInstallMessageHandler
75+
del qInstallMsgHandler
76+
77+
# QDesktopServices has has been split into (QDesktopServices and
78+
# QStandardPaths) in Qt5
79+
# This creates a dummy class that emulates QStandardPaths
80+
from PySide.QtGui import QDesktopServices as _QDesktopServices
81+
82+
class QStandardPaths():
83+
StandardLocation = _QDesktopServices.StandardLocation
84+
displayName = _QDesktopServices.displayName
85+
DesktopLocation = _QDesktopServices.DesktopLocation
86+
DocumentsLocation = _QDesktopServices.DocumentsLocation
87+
FontsLocation = _QDesktopServices.FontsLocation
88+
ApplicationsLocation = _QDesktopServices.ApplicationsLocation
89+
MusicLocation = _QDesktopServices.MusicLocation
90+
MoviesLocation = _QDesktopServices.MoviesLocation
91+
PicturesLocation = _QDesktopServices.PicturesLocation
92+
TempLocation = _QDesktopServices.TempLocation
93+
HomeLocation = _QDesktopServices.HomeLocation
94+
DataLocation = _QDesktopServices.DataLocation
95+
CacheLocation = _QDesktopServices.CacheLocation
96+
writableLocation = _QDesktopServices.storageLocation
97+
98+
import PySide.QtCore
99+
__version__ = PySide.QtCore.__version__
100+
else:
101+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
#
5+
# Licensed under the terms of the MIT License
6+
# (see LICENSE.txt for details)
7+
8+
"""
9+
Provides QtDesigner classes and functions.
10+
"""
11+
12+
from . import PYQT5, PYQT4, PythonQtError
13+
14+
15+
if PYQT5:
16+
from PyQt5.QtDesigner import *
17+
elif PYQT4:
18+
from PyQt4.QtDesigner import *
19+
else:
20+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtGui classes and functions.
11+
.. warning:: Only PyQt4/PySide QtGui classes compatible with PyQt5.QtGui are
12+
exposed here. Therefore, you need to treat/use this package as if it were
13+
the ``PyQt5.QtGui`` module.
14+
"""
15+
import warnings
16+
17+
from . import PYQT5, PYQT4, PYSIDE, PYSIDE2, PythonQtError
18+
19+
20+
if PYQT5:
21+
from PyQt5.QtGui import *
22+
elif PYSIDE2:
23+
from PySide2.QtGui import *
24+
elif PYQT4:
25+
try:
26+
# Older versions of PyQt4 do not provide these
27+
from PyQt4.QtGui import (QGlyphRun, QMatrix2x2, QMatrix2x3,
28+
QMatrix2x4, QMatrix3x2, QMatrix3x3,
29+
QMatrix3x4, QMatrix4x2, QMatrix4x3,
30+
QMatrix4x4, QTouchEvent, QQuaternion,
31+
QRadialGradient, QRawFont, QStaticText,
32+
QVector2D, QVector3D, QVector4D,
33+
qFuzzyCompare)
34+
except ImportError:
35+
pass
36+
from PyQt4.Qt import QKeySequence, QTextCursor
37+
from PyQt4.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap,
38+
QBrush, QClipboard, QCloseEvent, QColor,
39+
QConicalGradient, QContextMenuEvent, QCursor,
40+
QDoubleValidator, QDrag,
41+
QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent,
42+
QDropEvent, QFileOpenEvent, QFocusEvent, QFont,
43+
QFontDatabase, QFontInfo, QFontMetrics,
44+
QFontMetricsF, QGradient, QHelpEvent,
45+
QHideEvent, QHoverEvent, QIcon, QIconDragEvent,
46+
QIconEngine, QImage, QImageIOHandler, QImageReader,
47+
QImageWriter, QInputEvent, QInputMethodEvent,
48+
QKeyEvent, QLinearGradient,
49+
QMouseEvent, QMoveEvent, QMovie,
50+
QPaintDevice, QPaintEngine, QPaintEngineState,
51+
QPaintEvent, QPainter, QPainterPath,
52+
QPainterPathStroker, QPalette, QPen, QPicture,
53+
QPictureIO, QPixmap, QPixmapCache, QPolygon,
54+
QPolygonF, QRegExpValidator, QRegion, QResizeEvent,
55+
QSessionManager, QShortcutEvent, QShowEvent,
56+
QStandardItem, QStandardItemModel,
57+
QStatusTipEvent, QSyntaxHighlighter, QTabletEvent,
58+
QTextBlock, QTextBlockFormat, QTextBlockGroup,
59+
QTextBlockUserData, QTextCharFormat,
60+
QTextDocument, QTextDocumentFragment,
61+
QTextDocumentWriter, QTextFormat, QTextFragment,
62+
QTextFrame, QTextFrameFormat, QTextImageFormat,
63+
QTextInlineObject, QTextItem, QTextLayout,
64+
QTextLength, QTextLine, QTextList, QTextListFormat,
65+
QTextObject, QTextObjectInterface, QTextOption,
66+
QTextTable, QTextTableCell, QTextTableCellFormat,
67+
QTextTableFormat, QTransform,
68+
QValidator, QWhatsThisClickedEvent, QWheelEvent,
69+
QWindowStateChangeEvent, qAlpha, qBlue,
70+
qGray, qGreen, qIsGray, qRed, qRgb,
71+
qRgba, QIntValidator)
72+
73+
# QDesktopServices has has been split into (QDesktopServices and
74+
# QStandardPaths) in Qt5
75+
# It only exposes QDesktopServices that are still in pyqt5
76+
from PyQt4.QtGui import QDesktopServices as _QDesktopServices
77+
78+
class QDesktopServices():
79+
openUrl = _QDesktopServices.openUrl
80+
setUrlHandler = _QDesktopServices.setUrlHandler
81+
unsetUrlHandler = _QDesktopServices.unsetUrlHandler
82+
83+
def __getattr__(self, name):
84+
attr = getattr(_QDesktopServices, name)
85+
86+
new_name = name
87+
if name == 'storageLocation':
88+
new_name = 'writableLocation'
89+
warnings.warn(("Warning QDesktopServices.{} is deprecated in Qt5"
90+
"we recommend you use QDesktopServices.{} instead").format(name, new_name),
91+
DeprecationWarning)
92+
return attr
93+
QDesktopServices = QDesktopServices()
94+
95+
elif PYSIDE:
96+
from PySide.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap,
97+
QBrush, QClipboard, QCloseEvent, QColor,
98+
QConicalGradient, QContextMenuEvent, QCursor,
99+
QDoubleValidator, QDrag,
100+
QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent,
101+
QDropEvent, QFileOpenEvent, QFocusEvent, QFont,
102+
QFontDatabase, QFontInfo, QFontMetrics,
103+
QFontMetricsF, QGradient, QHelpEvent,
104+
QHideEvent, QHoverEvent, QIcon, QIconDragEvent,
105+
QIconEngine, QImage, QImageIOHandler, QImageReader,
106+
QImageWriter, QInputEvent, QInputMethodEvent,
107+
QKeyEvent, QKeySequence, QLinearGradient,
108+
QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2,
109+
QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3,
110+
QMatrix4x4, QMouseEvent, QMoveEvent, QMovie,
111+
QPaintDevice, QPaintEngine, QPaintEngineState,
112+
QPaintEvent, QPainter, QPainterPath,
113+
QPainterPathStroker, QPalette, QPen, QPicture,
114+
QPictureIO, QPixmap, QPixmapCache, QPolygon,
115+
QPolygonF, QQuaternion, QRadialGradient,
116+
QRegExpValidator, QRegion, QResizeEvent,
117+
QSessionManager, QShortcutEvent, QShowEvent,
118+
QStandardItem, QStandardItemModel,
119+
QStatusTipEvent, QSyntaxHighlighter, QTabletEvent,
120+
QTextBlock, QTextBlockFormat, QTextBlockGroup,
121+
QTextBlockUserData, QTextCharFormat, QTextCursor,
122+
QTextDocument, QTextDocumentFragment,
123+
QTextFormat, QTextFragment,
124+
QTextFrame, QTextFrameFormat, QTextImageFormat,
125+
QTextInlineObject, QTextItem, QTextLayout,
126+
QTextLength, QTextLine, QTextList, QTextListFormat,
127+
QTextObject, QTextObjectInterface, QTextOption,
128+
QTextTable, QTextTableCell, QTextTableCellFormat,
129+
QTextTableFormat, QTouchEvent, QTransform,
130+
QValidator, QVector2D, QVector3D, QVector4D,
131+
QWhatsThisClickedEvent, QWheelEvent,
132+
QWindowStateChangeEvent, qAlpha, qBlue,
133+
qGray, qGreen, qIsGray, qRed, qRgb, qRgba,
134+
QIntValidator)
135+
# QDesktopServices has has been split into (QDesktopServices and
136+
# QStandardPaths) in Qt5
137+
# It only exposes QDesktopServices that are still in pyqt5
138+
from PySide.QtGui import QDesktopServices as _QDesktopServices
139+
140+
class QDesktopServices():
141+
openUrl = _QDesktopServices.openUrl
142+
setUrlHandler = _QDesktopServices.setUrlHandler
143+
unsetUrlHandler = _QDesktopServices.unsetUrlHandler
144+
145+
def __getattr__(self, name):
146+
attr = getattr(_QDesktopServices, name)
147+
148+
new_name = name
149+
if name == 'storageLocation':
150+
new_name = 'writableLocation'
151+
warnings.warn(("Warning QDesktopServices.{} is deprecated in Qt5"
152+
"we recommend you use QDesktopServices.{} instead").format(name, new_name),
153+
DeprecationWarning)
154+
return attr
155+
QDesktopServices = QDesktopServices()
156+
else:
157+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2009- The Spyder Development Team
4+
#
5+
# Licensed under the terms of the MIT License
6+
# (see LICENSE.txt for details)
7+
8+
"""QtHelp Wrapper."""
9+
10+
import warnings
11+
12+
from . import PYQT5
13+
from . import PYQT4
14+
from . import PYSIDE
15+
from . import PYSIDE2
16+
17+
if PYQT5:
18+
from PyQt5.QtHelp import *
19+
elif PYSIDE2:
20+
from PySide2.QtHelp import *
21+
elif PYQT4:
22+
from PyQt4.QtHelp import *
23+
elif PYSIDE:
24+
from PySide.QtHelp import *
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import warnings
2+
3+
from . import PYQT5
4+
from . import PYQT4
5+
from . import PYSIDE
6+
from . import PYSIDE2
7+
8+
if PYQT5:
9+
from PyQt5.QtMultimedia import *
10+
elif PYSIDE2:
11+
from PySide2.QtMultimedia import *
12+
elif PYQT4:
13+
from PyQt4.QtMultimedia import *
14+
from PyQt4.QtGui import QSound
15+
elif PYSIDE:
16+
from PySide.QtMultimedia import *
17+
from PySide.QtGui import QSound
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtNetwork classes and functions.
11+
"""
12+
13+
from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
if PYQT5:
17+
from PyQt5.QtNetwork import *
18+
elif PYSIDE2:
19+
from PySide2.QtNetwork import *
20+
elif PYQT4:
21+
from PyQt4.QtNetwork import *
22+
elif PYSIDE:
23+
from PySide.QtNetwork import *
24+
else:
25+
raise PythonQtError('No Qt bindings could be found')

0 commit comments

Comments
 (0)