Re: [Pythoncad-developer] Testing R38
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
|
From: Gertwin G. <ger...@gm...> - 2010-05-21 14:47:39
|
Hi,
Maybe you can try to remove the lines:
# This is only needed for Python v2 but is harmless for Python v3.
import sip
sip.setapi('QString', 2)
>From the PyQt documentation:
<quote>
PyQt provides limited support for multiple incompatible APIs and the
ability for an application to select between them at run-time. For
example, an application can choose whether QString is implemented as a
Python type, or is automatically converted to and from a Python v2
unicode object or a Python v3 string object.
This ability allows developers to decide how to manage the transition
from an older deprecated, API to a newer incompatible API.
Each API that can be selected in this way has a name and a range of
version numbers. An application calls sip.setapi() to set the version
number of a particular API. This call must be made before any module
that implements the API is imported. Once set the version number
cannot be changed. If not set then an API will use its default
version.
For example the following code will disable the use of QString:
import sip
sip.setapi('QString', 2)
from PyQt4 import QtCore
# This will raise an attribute exception because QString is only wrapped
# in version 1 of the API.
s = QtCore.QString()
</quote>
Regards,
Gertwin
2010/5/21 Yagnesh Desai <yn...@gm...>:
> Friends;
>
> You guys seem to have done lot of work I need to do the catching:
>
> I tried to test R38 on 21st May.
> Firstly there were few things I needed to fix before test_kernel
> could start.
>
> 1. Change pygeolib to pyGeoLib in following files
> segment.py
> arc.py
> ccircle.py
> segjoint.py
> also on searching i found that there are 3 pyGeoLib.py files
> in pythoncad
>
> 2. Change the reference of intersection
> in segjoint.py
> just to tell there is another module name intersections (with 's')
> hope that is fine.
>
> Now that I could start test_kernel.py
> what it see text window taking my inputs no output seen.
>
> I am still struggling with pythoncad_qt.py
> error in pythoncad_qt.py is as under
>
> /media/disk/pythoncad/PythonCAD$ python pythoncad_qt.py
> Traceback (most recent call last):
> File "pythoncad_qt.py", line 5, in <module>
> sip.setapi('QString', 2)
> AttributeError: 'module' object has no attribute 'setapi'
>
> Regards
> Yagnesh Desai
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Pythoncad-developer mailing list
> Pyt...@li...
> https://lists.sourceforge.net/lists/listinfo/pythoncad-developer
>
|