can wxpython do this?

Gerhard Haering gerhard.haering at gmx.de
Sun Sep 15 22:19:03 EDT 2002


* Erick <erick_papadakis at REMOVEFORSPAM.yahoo.com> [2002-09-16 10:42 +0900]:
> Thank you very much Lothar.
> 
> > There is no problem to setup an installer easily that takes
> > Python,WXPysthon and whatever you need. It simply blowes up the
> > installer package size.
> 
> Isn't this the way to distribute wxpython apps? Because most users will not
> have python installed on their machines, much less the wxpython libraries?
> Or is it that after compilation users do not need Python installed at all?

There is no compilation step in Python ;-) You can go both ways:

1) Put a Python installation with the necessary libraries and DLLs (wxPython +
python22.dll)  in a directory, then feed that directory to your favourite
installer maker (NSIS, whatever)

2) Use a tool like py2exe or McMillan's installer to automatically find
dependencies and make a .exe out of your app. This will still need the Python
runtime & DLLs and about the only difference is that you don't have lots of
.py{c|o} files lying around.

I personally favour option #1 and cutting down the Python runtime manually, as
I experienced that apps created with py2exe don't produce very useful
tracebacks any more. Besides, for some libraries like PIL the automatic
dependency checking of py2exe doesn't work very well, anyway.

> > >for instance, can i minimize my application to a user's desktop's taskbar
> > >and have a right-click context menu on that taskbar entry?
> 
> > I think its not comfortable but possible. Look at the API to find out.
> 
> I searched the html help for "taskbar" and there is only one function for
> Win95/NT (wxTaskBarIcon). Looks like this feature is not yet supported?

It is. Just install wxPython on Windows, start the demo app and minimize it.
Voilà a taskbar icon. I recently wrote an IMAP mail watcher for win32 myself
that doesn't have any visible window and only consists of one wxPython taskbar
icon that changes icons and can be double-clicked :-)

> > There is a really simple WxHTML Widget and at least a C++ version of a
> > wrapped IExplorer control.
> 
> The wxHTML widget supports only some very basic HTML tags, but I guess
> that'll do for now. What I really wanted to know was if there is a way for
> me to connect to the Internet, make a call to a webserver as a browser would
> do, retrieve data and display it inside my application (with or without
> HTML...does not have to be HTML at all, actually).

You don't need wxPython for that, the Python standard library has all the means
for that, including support for the most popular protocols like http, ftp,
smtp, pop3, imap and nntp. Raw sockets of course, too.

> Perhaps wxSocket is what I am talking about.

Features that Python has already (like sockets, threads, ODBC, ...) aren't
wrapped from wxWindows to wxPython. You can use standard Python libraries like
socket and threading for these.

> But I did not see anything in the "demo" that has much to do with sockets.
> Would anyone know an example of using sockets in wxpython?

There is. Check out the Slashdot headline watcher and the Hangman example. But
that's really a Python rather than a wxPython issue.

-- Gerhard




More information about the Python-list mailing list