Released my wxPython app

Hey,

Just wanted to let you know, I released my little side project today, PythonTurtle:
http://pythonturtle.com

It’s an educational environment for learning Python.

I wanted to thank you all for helping out with all the wxPython issues I had.

Ram.

Looks nice! Congratulations and thanks for adding to the Python/wxPython app world.

Che

···

On Sat, Aug 1, 2009 at 10:15 AM, cool-RR ram.rachum@gmail.com wrote:

Hey,

Just wanted to let you know, I released my little side project today, PythonTurtle:
http://pythonturtle.com

It’s an educational environment for learning Python.

I wanted to thank you all for helping out with all the wxPython issues I had.

Ram.

cool-RR wrote:

Hey,

Just wanted to let you know, I released my little side project today, PythonTurtle:
http://pythonturtle.com

Congratulations! Looks good.

You might want to add it to:
http://wiki.wxpython.org/wxPythonPit%20Apps

Werner

Very nice. My daughter liked it. She immediately asked whether it was
possible to print the drawings :slight_smile:

I noticed two issues with the program: when using for loops to draw
there's a lot of flicker while drawing and there doesn't seem to be a
way to interrupt the drawing with Ctrl-C or something similar.

Cheers, Frank

···

2009/8/1 cool-RR <ram.rachum@gmail.com>:

Hey,

Just wanted to let you know, I released my little side project today,
PythonTurtle:
http://pythonturtle.com

Hey Frank,

Thanks for giving feedback. I’m happy your daughter liked it.
I’ve added “saving/printing drawings” to the issues list.

The “Ctrl-C” issue is already on the issues list.

But the flicker thing is what is interesting me. What operating system do you use? Does the flicker happen only in “for” loops?

(Please answer off-list, I don’t think this is of interest to wxPython-users.)

Ram.

···

On Thu, Aug 6, 2009 at 2:16 PM, Frank Niessink frank@niessink.com wrote:

2009/8/1 cool-RR ram.rachum@gmail.com:

Hey,

Just wanted to let you know, I released my little side project today,

PythonTurtle:

http://pythonturtle.com

Very nice. My daughter liked it. She immediately asked whether it was

possible to print the drawings :slight_smile:

I noticed two issues with the program: when using for loops to draw

there’s a lot of flicker while drawing and there doesn’t seem to be a

way to interrupt the drawing with Ctrl-C or something similar.

Cheers, Frank


Sincerely,
Ram Rachum

cool-RR wrote:

Hey Frank,

Thanks for giving feedback. I'm happy your daughter liked it.
I've added "saving/printing drawings" to the issues list.

The "Ctrl-C" issue is already on the issues list.

But the flicker thing is what is interesting me. What operating system do you use? Does the flicker happen only in "for" loops?

Windows is usually the culprit whenever flicker is mentioned, and it typically happens because of Clear()ing the dc before drawing on it. Since DCs are unbuffered by default on Windows then you can see some of the intermediate steps as a drawing is performed.

Take a look at the wiki for some samples of buffered drawing, but in a nutshell you'll want to intercept the EVT_ERASE_BACKGROUND event and do nothing in the handler, and also switch to drawing first to a bitmap and then drawing the bitmap to the screen in your paint event. There are some buffered DC classes to help with this.

(Please answer off-list, I don't think this is of interest to wxPython-users.)

Actually, it probably would be since it is a common problem that other wxPython users will encounter.

···

--
Robin Dunn
Software Craftsman

Robin Dunn wrote:

cool-RR wrote:
  

Hey Frank,

Thanks for giving feedback. I'm happy your daughter liked it.
I've added "saving/printing drawings" to the issues list.

The "Ctrl-C" issue is already on the issues list.

But the flicker thing is what is interesting me. What operating system do you use? Does the flicker happen only in "for" loops?
    
Windows is usually the culprit whenever flicker is mentioned, and it typically happens because of Clear()ing the dc before drawing on it. Since DCs are unbuffered by default on Windows then you can see some of the intermediate steps as a drawing is performed.

Take a look at the wiki for some samples of buffered drawing, but in a nutshell you'll want to intercept the EVT_ERASE_BACKGROUND event and do nothing in the handler, and also switch to drawing first to a bitmap and then drawing the bitmap to the screen in your paint event. There are some buffered DC classes to help with this.

(Please answer off-list, I don't think this is of interest to wxPython-users.)
    
Actually, it probably would be since it is a common problem that other wxPython users will encounter.

I found in my application that setting self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) in my panel solved all flickering issues on Windows, just a simple one-liner you may want to try :slight_smile:

Steven Sproat wrote:

I found in my application that setting self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) in my panel solved all flickering issues on Windows, just a simple one-liner you may want to try :slight_smile:

I keep forgetting about that. It's been there for a couple years now, but that still feels like a recent change to me. :slight_smile:

BTW & FYI, there was just some work done on the trunk a few weeks ago to make setting the background style more consistent across platforms. That should be in 2.9.1+.

···

--
Robin Dunn
Software Craftsman

that

···

On Aug 7, 12:21 pm, Steven Sproat <spro...@gmail.com> wrote:

Robin Dunn wrote:
>cool-RRwrote:

>> Hey Frank,

>> Thanks for giving feedback. I'm happy your daughter liked it.
>> I've added "saving/printing drawings" to the issues list.

>> The "Ctrl-C" issue is already on the issues list.

>> But the flicker thing is what is interesting me. What operating system
>> do you use? Does the flicker happen only in "for" loops?

> Windows is usually the culprit whenever flicker is mentioned, and it
> typically happens because of Clear()ing the dc before drawing on it.
> Since DCs are unbuffered by default on Windows then you can see some of
> the intermediate steps as a drawing is performed.

> Take a look at the wiki for some samples of buffered drawing, but in a
> nutshell you'll want to intercept the EVT_ERASE_BACKGROUND event and do
> nothing in the handler, and also switch to drawing first to a bitmap and
> then drawing the bitmap to the screen in your paint event. There are
> some buffered DC classes to help with this.

>> (Please answer off-list, I don't think this is of interest to
>> wxPython-users.)

> Actually, it probably would be since it is a common problem that other
> wxPython users will encounter.

I found in my application that setting
self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) in my panel solved all
flickering issues on Windows, just a simple one-liner you may want to try :slight_smile:

Did it: Solved about 80% of the flicker problem, which is enough for
now. Thanks so much.

Ram.

cool-RR wrote:

that

I found in my application that setting
self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) in my panel solved all
flickering issues on Windows, just a simple one-liner you may want to try :slight_smile:
    
Did it: Solved about 80% of the flicker problem, which is enough for
now. Thanks so much.

Ram.
  
great to hear! I might edit the wiki to add this since it's quite important and I tried many different solutions to solve the flicker

···

On Aug 7, 12:21 pm, Steven Sproat <spro...@gmail.com> wrote: