a few dumb questions

Hi,

wxPython is a GUI library. My question is why are there network sockets, zlib compression, XML, and ODBC functionality within wxPython if most of these already exist in Python, C/C++,etc? Is there a particular reason for it? The reason I ask is I'm about to start on an small application for work that will use wxPython, network sockets and ODBC. What reason would I use wxPython's implementation of sockets over Python's own sockets. I can see using Python's own sockets implementation as it would probably be faster since it's not some type of wrapper around a different library. (wxWindows C++ implementation) Am I just misguided in my understanding of what wxPython's socket functionality is for or am I right in my understanding?

Thanks,
Dave

wxpython is a wrapper around wxwidgets. C++ does not have "batteries included" so... they had to make some auxiliary, helper classes. My advice is to use python for everything not related to GUI.

···

On Fri, 27 Aug 2004 08:28:59 -0600, Junk <junk@centliq.com> wrote:

Hi,

wxPython is a GUI library. My question is why are there network sockets, zlib compression, XML, and ODBC functionality within wxPython if most of these already exist in Python, C/C++,etc? Is there a particular reason for it? The reason I ask is I'm about to start on an small application for work that will use wxPython, network sockets and ODBC. What reason would I use wxPython's implementation of sockets over Python's own sockets. I can see using Python's own sockets implementation as it would probably be faster since it's not some type of wrapper around a different library. (wxWindows C++ implementation) Am I just misguided in my understanding of what wxPython's socket functionality is for or am I right in my understanding?

--
Peter Damoc
Hacker Wannabe

In reality, wxPython doesn't support everything in the wxWidgets
library. In fact, wxSockets is one of the things that is NOT
supported, and for the very reason you stated: if Python already
supports it, there's no point in re-inventing it.

Mind you, in the case of sockets, native Python support is spotty in
some areas, and the native Python implementation does not play well
with wxPython's event loop. That seems to be the exception rather than
the rule, however. wx doesn't use wx threads, for example - Python's
do fine - but it does do it's own process spawning, because Python's
Win implementation ... well, put bluntly, it sucks.

Sometimes "batteries included" means "dead battery out of the box". :slight_smile:

···

On Fri, 27 Aug 2004 08:28:59 -0600, Junk <junk@centliq.com> wrote:

wxPython is a GUI library. My question is why are there network
sockets, zlib compression, XML, and ODBC functionality within wxPython
if most of these already exist in Python, C/C++,etc? Is there a
particular reason for it? The reason I ask is I'm about to start on an
small application for work that will use wxPython, network sockets and
ODBC. What reason would I use wxPython's implementation of sockets over
Python's own sockets. I can see using Python's own sockets
implementation as it would probably be faster since it's not some type
of wrapper around a different library. (wxWindows C++ implementation)
Am I just misguided in my understanding of what wxPython's socket
functionality is for or am I right in my understanding?

--
Kindest personal regards,

    Jeff

Junk wrote:

Hi,

wxPython is a GUI library. My question is why are there network sockets, zlib compression, XML, and ODBC functionality within wxPython if most of these already exist in Python, C/C++,etc? Is there a particular reason for it? The reason I ask is I'm about to start on an small application for work that will use wxPython, network sockets and ODBC. What reason would I use wxPython's implementation of sockets over Python's own sockets. I can see using Python's own sockets implementation as it would probably be faster since it's not some type of wrapper around a different library. (wxWindows C++ implementation) Am I just misguided in my understanding of what wxPython's socket functionality is for or am I right in my understanding?

With only a few exceptions wxPython only wraps the UI and related classes from wxWidgets. To see exactly what's in wxPython you can take a look at what is done so far for the new Python-specific API reference docs: wxPython API Documentation — wxPython Phoenix 4.2.2 documentation Much of the content is not there yet, but there is an entry for every function and class.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!