/usr/lib/python2.7/dist-packages/PyQt4/Qwt5/anynumpy.py is in python-qwt5-qt4 5.2.1~cvs20091107+dfsg-7build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # import either NumPy, or numarray, or Numeric
for name in ('numpy', 'numarray', 'Numeric'):
failed = False
try:
eval(compile('from %s import *' % name, 'eval', 'exec'))
if name == 'numpy':
from numpy.oldnumeric.compat import *
Float = float
UInt8 = uint8
except ImportError:
failed = True
if not failed:
break
else:
import PyQt4.Qt as Qt
if not Qt.QCoreApplication.instance():
a = Qt.QApplication([])
Qt.QMessageBox.critical(
None,
'Numerical Python Extension Required',
'This example requires a Numerical Python Extension, but\n'
'failed to import either NumPy, or numarray, or Numeric.\n'
'NumPy is available at http://sourceforge.net/projects/numpy'
)
raise SystemExit(
'Failed to import either NumPy, or numarray, or Numeric.\n'
'NumPy is available at http://sourceforge.net/projects/numpy'
)
# Local Variables: ***
# mode: python ***
# End: ***
|