[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Which version of Python does dip REALLY work with?
From:       Peter Milliken <peter.milliken () gmail ! com>
Date:       2010-07-29 21:13:06
Message-ID: AANLkTikBRiU39xkay97YQyUMcfGa7uzqNBF77SsDWG3F () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I have Mark Summerfield's book on Rapid gui development with Python and Qt
and followed the link in Appendix A and found "dip".

I have Python 2.6.2. The web-site states it works with 2.6, 2.7 and 3.x, I
realise it is 0.1 and is bound to have problems, but...

First problem after installation was that the "shebang" doesn't work with
cygwin bash and Windows XP i.e. when you just run dip-builder it returns a
complaint of "no such file" for /c/Python26/Scripts/dip-builder - Python
doesn't understand bash paths.

Next problem (after explicitly running dip-builder in the Scripts directory)
was the final line:

wres12386#1(/c/Python26/Scripts)$ python dip-builder
  File "dip-builder", line 93
    sys.exit(app.exec())
                    ^
SyntaxError: invalid syntax
[exited with 1]

A quick look at the Qt documentation for QApplication shows it should be
app.exec_()

So that script can't work with ANY version of Python :-)

Fixed that, then it complained with:

wres12386#1(/c/Python26/Scripts)$ python dip-builder
Traceback (most recent call last):
  File "dip-builder", line 28, in <module>
    from dip.plugins import PluginManager
  File "c:\Python26\lib\site-packages\dip\plugins\__init__.py", line 21, in
<module>
    from .i_extension_point import IExtensionPoint
  File "c:\Python26\lib\site-packages\dip\plugins\i_extension_point.py",
line 16, in <module>
    from dip.model import Interface, List, Str
  File "c:\Python26\lib\site-packages\dip\model\__init__.py", line 45, in
<module>
    from .adapt import adapt
  File "c:\Python26\lib\site-packages\dip\model\adapt.py", line 21
    def adapt(*adapted, to):
                         ^
SyntaxError: invalid syntax
[exited with 1]

Not sure what this error is - haven't investigated it, thought it might be
advisable to re-check the versions of Python it is supposed to work with. I
realise I don't have the latest 2.6.x, but I thought before I go to a lot of
trouble downloading other versions of Python (I do not want to go to 3.x - I
need to stay with 2.x), I thought I would ask the question:

Exactly what version of Python has anybody ACTUALLY got the dip distribution
working with? :-)

In the meantime, I think I'll just go back to reading the book...

Thanks
Peter

[Attachment #5 (text/html)]

Hi,<div><br></div><div>I have Mark Summerfield&#39;s book on Rapid gui deve=
lopment with Python and Qt and followed the link in Appendix A and found &q=
uot;dip&quot;.</div><div><br></div><div>I have Python 2.6.2. The web-site s=
tates it works with 2.6, 2.7 and 3.x, I realise it is 0.1 and is bound to h=
ave problems, but...</div>
<div><br></div><div>First problem after installation was that the &quot;she=
bang&quot; doesn&#39;t work with cygwin bash and Windows XP i.e. when you j=
ust run dip-builder it returns a complaint of &quot;no such file&quot; for =
/c/Python26/Scripts/dip-builder - Python doesn&#39;t understand bash paths.=
</div>
<div><br></div><div>Next problem (after explicitly running dip-builder in t=
he Scripts directory) was the final line:</div><div><br></div><div><div>wre=
s12386#1(/c/Python26/Scripts)$ python dip-builder</div><div>=A0=A0File &quo=
t;dip-builder&quot;, line 93</div>
<div>=A0=A0 =A0sys.exit(app.exec())</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0^</div><div>SyntaxError: invalid syntax</div><div>[exited wi=
th 1]</div></div><div><br></div><div>A quick look at the Qt documentation f=
or QApplication shows it should be app.exec_()</div>
<div><br></div><div>So that script can&#39;t work with ANY version of Pytho=
n :-)</div><div><br></div><div>Fixed that, then it complained with:</div><d=
iv><br></div><div><div>wres12386#1(/c/Python26/Scripts)$ python dip-builder=
</div>
<div>Traceback (most recent call last):</div><div>=A0=A0File &quot;dip-buil=
der&quot;, line 28, in &lt;module&gt;</div><div>=A0=A0 =A0from dip.plugins =
import PluginManager</div><div>=A0=A0File &quot;c:\Python26\lib\site-packag=
es\dip\plugins\__init__.py&quot;, line 21, in &lt;module&gt;</div>
<div>=A0=A0 =A0from .i_extension_point import IExtensionPoint</div><div>=A0=
=A0File &quot;c:\Python26\lib\site-packages\dip\plugins\i_extension_point.p=
y&quot;, line 16, in &lt;module&gt;</div><div>=A0=A0 =A0from dip.model impo=
rt Interface, List, Str</div>
<div>=A0=A0File &quot;c:\Python26\lib\site-packages\dip\model\__init__.py&q=
uot;, line 45, in &lt;module&gt;</div><div>=A0=A0 =A0from .adapt import ada=
pt</div><div>=A0=A0File &quot;c:\Python26\lib\site-packages\dip\model\adapt=
.py&quot;, line 21</div>
<div>=A0=A0 =A0def adapt(*adapted, to):</div><div>=A0=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 ^</div><div>SyntaxError: invalid syntax</div><d=
iv>[exited with 1]</div></div><div><br></div><div>Not sure what this error =
is - haven&#39;t investigated it, thought it might be advisable to re-check=
 the versions of Python it is supposed to work with. I realise I don&#39;t =
have the latest 2.6.x, but I thought before I go to a lot of trouble downlo=
ading other versions of Python (I do not want to go to 3.x - I need to stay=
 with 2.x), I thought I would ask the question:</div>
<div><br></div><div>Exactly what version of Python has anybody ACTUALLY got=
 the dip distribution working with? :-)</div><div><br></div><div>In the mea=
ntime, I think I&#39;ll just go back to reading the book...</div><div><br>
</div><div>Thanks</div><div>Peter</div><div><br></div><div><br></div>


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic