0

it's my first post, hope to not break something :). On windows there are two versions of python2.7, 32 bit and 64 bit both with pyqt and qwt5 i'm trying pyqt from some week, today i tried to use my python/pyqt/pyqwt code written on linux, on windows, but the prompt says:

C:\Users\bomba\Desktop\conversione_python\guibms>python-32 interfaccia_mark3.2.p
y
Traceback (most recent call last):
  File "interfaccia_mark3.2.py", line 14, in <module>
    from PyQt4.Qwt5.qplt import *

  File "C:\Python27-32bit\lib\site-packages\PyQt4\Qwt5\qplt.py", line 95, in <mo
dule>

    Y1 = Left   = QwtPlot.yLeft

NameError: name 'QwtPlot' is not defined

someone could explain me this?

I would really apppreciate

bomba
  • 153
  • 1
  • 2
  • 13

1 Answers1

1

You haven't defined the Qwtplot object. Try using:

import PyQt4.Qwt5 as Qwt
plot = Qwt.QwtPlot()

and then use the plot object as you wish.

iTayb
  • 12,373
  • 24
  • 81
  • 135
  • thanks for answer, but the same error remains. in which module should be defined the qwtplot? there a problem in qplt i think... – bomba Jun 30 '12 at 16:11
  • I'm sorry I'm late with the paste, but i didn't understand how to solve it – bomba Jul 01 '12 at 17:09
  • if i do as you say the prompt prints C:\Users\bomba\Desktop\conversione_python\guibms>python-32 interfaccia_mark3.2.p y Traceback (most recent call last): File "interfaccia_mark3.2.py", line 13, in plot = Qwt.QwtPlot(self.scrollAreaWidgetCont_middle) AttributeError: 'module' object has no attribute 'QwtPlot' – bomba Jul 01 '12 at 17:18
  • i tried installing pyqt and compiling qwt5.2 again but now my prompt gently says: NMAKE : fatal error U1052: impossibile trovare il file 'qwt_version_info.mak' Stop. Impossiblo to find the specified path. Failed to import qwt_version_info. – bomba Jul 05 '12 at 14:35
  • i solved installing this set: python-2.6.2.msi numpy-1.3.0-win32-superpack-python2.6.exe PyQt-Py2.6-gpl-4.5.4-1.exe PyQwt5.2.0-Python2.6-PyQt4.5.4-NumPy1.3.0-1.exe – bomba Jul 06 '12 at 11:54