documentation examples

In fact I have the wx dir with many of the individual files inside and it
works. I got file by file using the cvs view facility in your site. I'm only
wanted to know is there is a chance for me to get the whole package without
using cvs or getting every individual file.

Thanks
Cristian

···

-----Original Message-----
From: pobrien@orbtech.com [mailto:pobrien@orbtech.com]
Sent: Thursday, May 08, 2003 11:20 AM
To: wxPython-users@lists.wxwindows.org
Cc: cecheverria@transelec.cl
Subject: Re: [wxPython-users] Re: documentation examples

Donnal Walter <donnalcwalter@yahoo.com> writes:

--- "Echeverria_Rabi,_Cristián" <cecheverria@transelec.cl> wrote:
> It is possible to get a zip version of the wx package?
> I can't get it using CVS because I'm behind a firewall.

It is only 1K. Simply place the attached __init__.py file in an
empty folder named 'wx' in your wxPython folder.

Thanks, Donnal. Here are a few details to consider.

That __init__.py will handle the main wx namespace, but not all the
other modules, such as calendars, gizmos, grid, help, etc. The wx
package that will be installed by wxPython 2.4.1 does handle all the
other modules. But if you aren't using any of those modules, you'll
be fine with just a wx directory and that __init__.py file (or,
preferably, the one below) on your Python Path.

Also the wx directory you create shouldn't be a subdirectory of
wxPython, it should simply be its own package, somewhere on your
Python Path, accessed using:

    import wx

And, finally, the version of the code Donnal posted is not compatible
with Python 2.1. Here is the latest from the wxPython CVS repository:

"""wx package

Provides a way to drop the wx prefix from wxPython objects."""

__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = "$Id: __init__.py,v 1.1.2.2 2003/04/30 14:19:17 PKO Exp $"
__revision__ = "$Revision: 1.1.2.2 $"[11:-2]

from wxPython import wx

import types

d_new = globals()
d_old = wx.__dict__

for old, obj in d_old.items():
    if type(obj) is types.ModuleType or old.startswith('_'):
        # Skip modules and private names.
        continue
    new = old
    if old.startswith('EVT_'):
        # Leave name unmodified; add to the new wx namespace.
        d_new[new] = obj
    elif old.startswith('wxEVT_'):
        # Leave name unmodified; add to the new wx namespace.
        d_new[new] = obj
    else:
        if old.startswith('wx'):
            # Remove the 'wx' prefix.
            new = old[2:]
        # Add to the new wx package namespace.
        d_new[new] = obj

del d_new
del d_old
del new
del obj
del old
del types

del wx

Let us know if you run into any problems.

--
Patrick K. O'Brien
Orbtech http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------

"Echeverria Rabi, Cristián" <cecheverria@transelec.cl> writes:

In fact I have the wx dir with many of the individual files inside and it
works. I got file by file using the cvs view facility in your site. I'm only
wanted to know is there is a chance for me to get the whole package without
using cvs or getting every individual file.

Go here:

http://www.orbtech.com/www/wx/

You'll find two versions of the wx directory: wx.zip and wx.tar.gz.
They both contain the same thing. Download whichever you want and
uncompress it.

···

--
Patrick K. O'Brien
Orbtech http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------