Phil Thompson | 1 Apr 2007 17:20
Picon

Re: SIP Support for wchar_t

On Tuesday 27 March 2007 10:52 am, Giovanni Bajo wrote:
> On 3/25/2007 4:06 PM, Phil Thompson wrote:
> > As of tonight's snapshot SIP has support for wchar_t. There are some
> > issues related to wide strings and the heap - see the documentation for
> > details - which could be partly addressed with some new annotations. I'd
> > prefer that any changes are based on real world examples, so let me have
> > some feedback if you use want to use wchar_t in your own bindings.
>
> OK, first issue: it looks like both char* and wchar_t* map to the same
> Python type. I'm wrapping an API like this:
>
>     void Foo(char* string);
>     void Foo(wchar_t* string);
>
> The idea is that a 8-bit string (Python "str") goes to the first
> function, while an Unicode string (Python "unicode") goes to the second
> function.
>
> Comments?

Should be fixed in tonight's snapshot.

Phil
Phil Thompson | 1 Apr 2007 17:28
Picon

Re: SIP Support for wchar_t

On Tuesday 27 March 2007 10:57 am, Giovanni Bajo wrote:
> On 3/25/2007 4:06 PM, Phil Thompson wrote:
> > As of tonight's snapshot SIP has support for wchar_t. There are some
> > issues related to wide strings and the heap - see the documentation for
> > details - which could be partly addressed with some new annotations. I'd
> > prefer that any changes are based on real world examples, so let me have
> > some feedback if you use want to use wchar_t in your own bindings.
>
> ... and a bug report: SIP generates a sipFree() call to free the wchar_t
> memory after having used it. It works if the pointer is of type
> "wchar_t*", but it does not work if the pointer is of type "const
> wchar_t*":
>
> error C2664: 'void (void *)' : cannot convert parameter 1 from 'const
> wchar_t *' to 'void *'
>          Conversion loses qualifiers
>
> I worked around it by dropping the const qualifiers from the parameter
> declarations in the SIP files.

Should be fixed in tonight's snapshot.

Phil
Bart. | 1 Apr 2007 18:17
Picon
Favicon

Re: Re: problem with sip

> Date: Sat, 31 Mar 2007 23:31:11 +0000
> From: Phil Thompson <phil <at> riverbankcomputing.co.uk>
> Subject: Re: [PyQt] problem with sip
> To: pyqt <at> riverbankcomputing.com
> Message-ID: <200704010031.11123.phil <at> riverbankcomputing.co.uk>
> Content-Type: text/plain;  charset="utf-8"
> 
> On Saturday 31 March 2007 11:31 pm, Bart. wrote:
> > Hi Everyone!
> > My name is Bartek Zimon
> > It's my begining with PyQt 3 befor only pyuic (it works great :).
> >
> > I want to add python scripting to Qt Application Kadu (kadu.net).
> > 1. Is it possible to add python scripting to application using SIP ?
> >    I want to have access to (almost) all the classes of this
application.
> >    The module will be (if possible) in shared library and loaded if
user
> > want.
> >
> > >From now I've got lots of problems with SIP:
> >
> > 2. According to http://www.riverbankcomputing.com/Docs/sip4/sipref.html
> >   I'v created configure.py and kadu.sip (inside for tests definied only
> > class About : QHbox ) python configure.py didn't work because .:
> >   sip: Unable to find file "qt/qhbox.sip"
> >
> >   How to use sip to get sip files from /usr/share/sip ?
> 
> Use the -I command line flag. See...
(Continue reading)

Giovanni Bajo | 2 Apr 2007 02:07
Favicon
Gravatar

Re: converting std::vector to PyList

On 30/03/2007 9.36, Patrick Stinson wrote:

> good greif! That's a good response. I didn't realize you could wrap
> templates like that.
> 
> Another way I found to get around this problem was to pass a python
> list as a SIP_PYLIST argument and populate it with the values returned
> from the C++ method after calling it with a temporary.
> 
> I shall copy your code, and I shall use your code.

Sure. Get back to me with fixes or additions! :)
--

-- 
Giovanni Bajo

Marco | 2 Apr 2007 10:45

the frame of PyQt + Socket?

Hi,
 I want to write a PyQt4 program, which like a graph-ssh. One side
user choose server moder, and other side(s) user choose client mode.
Both of them have a GUI, they can connect via socket.

 I have study PyQt4 for a while and learn a little socket(from W.R
Stevens Unix Networking Programming). But I donot know how to integer
both of them.

 What the frame of this kind of program looked like? Or is there some example?

Thank you !!

--

-- 
LinuX Power
Marco | 2 Apr 2007 11:40

Re: the frame of PyQt + Socket?

Thank you, I'll read it.

On 4/2/07, Marco <marco <at> waven.com> wrote:
> Hi,
>  I want to write a PyQt4 program, which like a graph-ssh. One side
> user choose server moder, and other side(s) user choose client mode.
> Both of them have a GUI, they can connect via socket.
>
>  I have study PyQt4 for a while and learn a little socket(from W.R
> Stevens Unix Networking Programming). But I donot know how to integer
> both of them.
>
>  What the frame of this kind of program looked like? Or is there some
> example?
>
> Thank you !!
>
>
>
> --
> LinuX Power
>

--

-- 
LinuX Power
Detlev Offenbach | 2 Apr 2007 11:50
Picon
Favicon

ANN: new eric4 snapshot available

Hi,

I'd like to inform you about the availability of a new eric4 snapshot. It 
fixes a few bugs and contains this new/changed functionality.

- added a dialog to derive code for a forms implementation for Qt4
- changed the shortcuts dialog to show icons of the actions
- moved the dialog showing external tools used by eric4 to the
  preferences menu
- changed the handling of the commit message dialogs to enhance
  their usability
- enhanced win32 comptibility

As usual it is availabla via http://www.die-offenbachs.de/detlev/snapshots4/.

Regards,
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de
Phil Thompson | 2 Apr 2007 15:10
Picon

Re: PyQt(3) QDockWindow error

On Wednesday 28 March 2007 3:01 pm, Giovanni Bajo wrote:
> On 3/28/2007 3:21 PM, V. Armando Sole wrote:
> > I have problems with the latest PyQt snapshot (February) and latest sip
> > snapshot.
> > The problems come from the fact QDockWindow.boxLayout() returns a
> > QSpacerItem instead of a QBoxLayout.
> >
> > At the python promt :
> >
> > import qt
> > app = qt.QApplication([])
> > w = qt.QDockWindow()
> > w.boxLayout()
> >
> > <qt.QSpacerItem object at 0x405a882c>
> >
> > That does not happen with the non snapshot versions of sip and PyQt3. My
> > problem is that I need the latest sip snapshots in order to avoid the
> > deadlocks in PyQt4 threads and the non-snapshot version of PyQt3 does
> > not compile with the latest sip snapshot.
>
> Yes, I had reported this problem to Phil Thompson already. The bug was
> introduced with this commit:
>
> 2007/02/25  0:19:29  phil
> Included Matt Newell's fix for making sure that a sub-class convertor
> returns the most specific type available.
>
> You can apply the attached patch to workaround the problem, until Phil
> provides the correct fix.
(Continue reading)

Phil Thompson | 3 Apr 2007 13:23
Picon

New Releases of PyQt4, PyQt3, SIP

I plan to make new releases of PyQt4, PyQt3 and SIP (probably) over the 
weekend.

Let me know if there is something that isn't fixed in current snapshots but 
should be.

Phil
Giovanni Bajo | 3 Apr 2007 14:14
Favicon
Gravatar

Re: New Releases of PyQt4, PyQt3, SIP


On Tue, 3 Apr 2007 12:23:54 +0100, Phil Thompson <phil <at> riverbankcomputing.co.uk> wrote:

> I plan to make new releases of PyQt4, PyQt3 and SIP (probably) over the
> weekend.
> 
> Let me know if there is something that isn't fixed in current snapshots
> but should be.

What about the PyOS input hook?
http://article.gmane.org/gmane.comp.python.pyqt-pykde/7726/
--

-- 
Giovanni Bajo


Gmane