wxPyExtras SVN repository

I have create a SVN repository "wxPyExtras"
It is on a well maintained server with plenty of bandwidth

server: svn://ozdocit.org
repository: svn://ozdocit.org/wxPyExtras
web interface: http://ozdocit.org/websvn/listing.php?repname=wxPyExtras

Using it is easy.
Linux users are usually alreadywell equipped
If you use Windows, just download http://tortoisesvn.tigris.org/
Macs, I have no idea

svn co svn://ozdocit.org/wxPyExtras
checks everything out.

svn update
#gets all changed files from the repository

If you want to actively contribute, you need a user name and password. You can
get them from me by private email

svn commit
#commits all changed files in your local directory to the repository

svn commit <filename> ...
#same as above, just specifying one or more filenames

Horst

Horst Herb wrote:

I have create a SVN repository "wxPyExtras"
It is on a well maintained server with plenty of bandwidth

Robin and Kenin O. have started work on a "wxPython addons" sourceforge project, which may be a better bet for stuff that is, or is likely to be, added to the wxPython lib.

Robin or Kevin, what's the status?

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Hi Chris,

Horst Herb wrote:

I have create a SVN repository "wxPyExtras"
It is on a well maintained server with plenty of bandwidth

Robin and Kenin O. have started work on a "wxPython addons" sourceforge project, which may be a better bet for stuff that is, or is likely to be, added to the wxPython lib.

Robin or Kevin, what's the status?

The guts of the system are in place. The latest wxPython test releases install a wxaddons module into site-packages that contains some special distutils logic to allow components to install to the right place (and generate a primitive install receipt) and also acts as a storage location for them. We've also created a CVS repository at wxPyStoneSoup download | SourceForge.net and designed a basic format for contributions. You can take a look at this by checking out the "components" module and then going into sized_controls or persistence and running "setup.py install". Once you've done that, you can run the addons using "import wxaddons.sized_controls" and "import wxaddons.persistence", respectively.

On this end of things, we could use some help in terms of adding more sophisticated addons (and C++ extensions) and working out any issues with those in our current install system. Once we have this a bit more stress-tested, we can document the format and the "getting started" process for making your code an addon.

The web site is still very much a work in process. We've setup the basic members site, where you can register an account, and add/update component information. We've also got the infrastructure for XML-RPC communication between the web server and Python scripts. Once these bits are in place, we'll just need to add a pretty design for the site.

There are also plans for an addon manager/udpater, based off my old wxPyPackageManager, but those are still very much just plans at this point. :wink:

Thanks,

Kevin

···

On Jun 27, 2006, at 2:26 PM, Christopher Barker wrote:

-Chris

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hello!

During some calculations I want to show a window with a message what I'm
actually doing. This window must be modal to prevent other actions on
the GUI and so there should be no chance to kill this window by the
user. Killing should only be done by the software, when the calculations
are finished.
I played with modal dialogs, but as the name says, the ShowModal()
method just returns after a user action, which I don't want.
I also tried to call Show() and SetModal() but the last one seems not to exist any more (using wxWidgets 2.6.1.0)

My second try was the wx.ProgressDialog. This could work, but I would
like to prevent the progress bar itself because I can't feed it with useful information.

Any ideas how to disable the progress bar only?

Is there any other way to generate a dialog/window/frame with a ShowModal method which returns immediately, but the dialog/window/frame should stay modal until I call another method?

Thanks

Thomas Jäckle

This is probably the right track. I've appended a small working example
that does what I think you want.

DemoFrame is just a frame with a button you can click to start the
calculation. DemoDialog does the interesting stuff. It starts a thread
to run the calculation, then calls ShowModal() on itself. Because it
has no buttons, the user can't dismiss it. The calculation, in its own
thread, does its stuff then calls EndModal(0) on the wx.Dialog. Because
it's not in the GUI thread, it has to use wx.CallAfter to call
GUI-related functions safely.

Hope this makes sense.

  Simon.

···

On Tue, Jul 04, 2006 at 10:06:34AM +0200, Thomas wrote:

Hello!

During some calculations I want to show a window with a message what I'm
actually doing. This window must be modal to prevent other actions on
the GUI and so there should be no chance to kill this window by the
user. Killing should only be done by the software, when the calculations
are finished.
I played with modal dialogs, but as the name says, the ShowModal()
method just returns after a user action, which I don't want.

--------------------------------------------

import threading,time,wx

BUTTONID=101

class DemoFrame(wx.Frame):
    def __init__(self):
        # Set up a frame with a single button labelled "Click me"
        wx.Frame.__init__(self,None,-1,"Demo")
        self.ctrl=wx.Button(self,BUTTONID,"Click me")
        self.Bind(wx.EVT_BUTTON,self.onClick,self.ctrl)
        self.Show()

    def onClick(self,event):
        # When the button is clicked, call the constructor of DemoDialog
        print "Received click"
        DemoDialog(self)
        print "Finished"

class DemoDialog(wx.Dialog):
    def __init__(self,parent):
        # Draw a label saying what we're doing
        N=5
        wx.Dialog.__init__(self,parent,-1,"Wait for it....")
        self.label=wx.StaticText(self,-1,"Thinking for "+str(N)+"s")
        # Start up a thread to do the calculations (self.run(N))
        t=threading.Thread(target=self.run,args=(N,))
        t.setDaemon(True)
        t.start()
        # Show the dialog, blocking user actions except for this dialog,
        # which has no buttons
        self.ShowModal()

    def run(self,n):
        # Re-write the label, counting down to 0. Note the use of
        # wx.CallAfter
        # to make any calls to the GUI because we're in a non-GUI
        # thread.
        # Replace this bit with your calculations.
        t=time.time()
        currentT=n
        while time.time()<t+n:
            if int(time.time()-t)!=n-currentT:
                currentT-=1
                wx.CallAfter(self.label.SetLabel, \
                             "Thinking for "+str(currentT)+"s")
        # Pop down the window. Keep this bit!
        wx.CallAfter(self.EndModal,0)

class DemoApp(wx.App):
    def OnInit(self):
        DemoFrame()
        return True

app=DemoApp()
app.MainLoop()

Thomas wrote:

Is there any other way to generate a dialog/window/frame with a ShowModal method which returns immediately, but the dialog/window/frame should stay modal until I call another method?

Try frame.MakeModal.

···

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

Hello Simon!

I tested it and it works great for the purpose I need. Very interesting idea!

Nevertheless I will use Robin's proposal, it's much more simple to handle.

Thanks to both of you!

Thomas Jäckle

Indeed. They always are. :slight_smile:

  Simon.

···

On Wed, Jul 05, 2006 at 10:53:30AM +0200, Thomas wrote:

Hello Simon!

I tested it and it works great for the purpose I need. Very interesting
idea!

Nevertheless I will use Robin's proposal, it's much more simple to handle.

From: Simon Clay [mailto:simon.clay@imperial.ac.uk]
Sent: woensdag 5 juli 2006 14:12
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Modal window

> Hello Simon!
>
> I tested it and it works great for the purpose I need. Very

interesting

> idea!
>
> Nevertheless I will use Robin's proposal, it's much more simple to
handle.

Indeed. They always are. :slight_smile:

Simon.

Yeah, but I needed to do something very similar, except I wanted to show
updates on the screen while doing my work... So I figured that I'd need
an extra thread, one for doing my work and another thread for the GUI
updates; so I copied your code into my project -- Thanks a lot for the
sample!

(I made some modifications; the thread is started from an extra method
instead of __init__ and I don't instantly call 'EndModal' but instead
enable a button)

Cheers,

--Tim

···

-----Original Message-----
On Wed, Jul 05, 2006 at 10:53:30AM +0200, Thomas wrote: