Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101767 > unrolled thread

wxpython strange behaviour

Started byShiva Upreti <katewinslet626@gmail.com>
First post2016-01-15 09:05 -0800
Last post2016-01-15 16:49 -0800
Articles 10 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 09:05 -0800
    Re: wxpython strange behaviour Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-15 10:24 -0700
      Re: wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 16:52 -0800
      Re: wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 16:56 -0800
    Re: wxpython strange behaviour Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-01-15 20:51 +0000
      Re: wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 16:58 -0800
        Re: wxpython strange behaviour Michael Torrie <torriem@gmail.com> - 2016-01-15 23:47 -0700
    Re: wxpython strange behaviour Dietmar Schwertberger <maillist@schwertberger.de> - 2016-01-15 22:22 +0100
      Re: wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 16:59 -0800
    Re: wxpython strange behaviour Shiva Upreti <katewinslet626@gmail.com> - 2016-01-15 16:49 -0800

#101767 — wxpython strange behaviour

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 09:05 -0800
Subjectwxpython strange behaviour
Message-ID<56470d3e-0a06-4ba1-8da7-b6966985b7f4@googlegroups.com>
https://gist.github.com/anonymous/4baa67aafd04555eb4e6

I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
Error message I got:
https://gist.github.com/anonymous/f0d4ec685d2432c80a1

There is one more issue. I am using canopy as my environment, and when i run it using canopy it works fine at least for the first time but when I run it using command prompt in windows 10, nothing happens, I get no errors and still it does not work.

Please help me solve these issues.

[toc] | [next] | [standalone]


#101768

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-01-15 10:24 -0700
Message-ID<mailman.24.1452878738.15297.python-list@python.org>
In reply to#101767
On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti <katewinslet626@gmail.com> wrote:
> https://gist.github.com/anonymous/4baa67aafd04555eb4e6
>
> I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> Error message I got:
> https://gist.github.com/anonymous/f0d4ec685d2432c80a1

The first gist is short enough that it easily could have been included
inline in your message. The second gist is a 404 (looks like it may be
short one hex digit).

I haven't used wxPython in a while and I've never used that ToasterBox
widget, but I'll see what I can answer.

If you don't want any frames then you should probably use parent=None,
not parent=wx.Frame(None), which creates a frame. Also, the purpose of
the panel is unclear since it's never used.

When you say that you run it the next time, do you mean that you're
running this script twice, as two separate processes, and getting
different results? That seems strange. Or do you mean that you're
invoking this code multiple times in the same Python process?

[toc] | [prev] | [next] | [standalone]


#101790

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 16:52 -0800
Message-ID<8cb928e2-02f4-40cf-b124-c90a319f43c7@googlegroups.com>
In reply to#101768
On Friday, January 15, 2016 at 10:55:59 PM UTC+5:30, Ian wrote:
> On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti <katewinslet626@gmail.com> wrote:
> > https://gist.github.com/anonymous/4baa67aafd04555eb4e6
> >
> > I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> > Error message I got:
> > https://gist.github.com/anonymous/f0d4ec685d2432c80a1
> 
> The first gist is short enough that it easily could have been included
> inline in your message. The second gist is a 404 (looks like it may be
> short one hex digit).
> 
> I haven't used wxPython in a while and I've never used that ToasterBox
> widget, but I'll see what I can answer.
> 
> If you don't want any frames then you should probably use parent=None,
> not parent=wx.Frame(None), which creates a frame. Also, the purpose of
> the panel is unclear since it's never used.
> 
> When you say that you run it the next time, do you mean that you're
> running this script twice, as two separate processes, and getting
> different results? That seems strange. Or do you mean that you're
> invoking this code multiple times in the same Python process?

parent=None doesnt work, it gives error:
<code>
AttributeError                            Traceback (most recent call last)
C:\Users\Mike\Desktop\zz.py in <module>()
      5 app = wx.App()
      6 panel=wx.Panel(parent=wx.Frame(None))
----> 7 toaster = TB.ToasterBox(parent=None, tbstyle=TB.TB_COMPLEX, closingstyle=TB.TB_ONTIME)
      8 
      9 toaster.SetPopupPauseTime(3000)

C:\Users\Mike\AppData\Local\Enthought\Canopy\User\lib\site-packages\wx\lib\agw\toasterbox.pyc in __init__(self, parent, tbstyle, windowstyle, closingstyle, scrollType)
    135                                     wx.GetDisplaySize().GetHeight())
    136 
--> 137        parent.Bind(wx.EVT_ICONIZE, lambda evt: [w.Hide() for w in winlist])
    138 
    139        self._tb = ToasterBoxWindow(self._parent, self, self._tbstyle, self._windowstyle,

AttributeError: 'NoneType' object has no attribute 'Bind'
</code>

[toc] | [prev] | [next] | [standalone]


#101791

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 16:56 -0800
Message-ID<0346793b-ec17-4bb3-b5df-e13b7b9ae39e@googlegroups.com>
In reply to#101768
On Friday, January 15, 2016 at 10:55:59 PM UTC+5:30, Ian wrote:
> On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti <katewinslet626@gmail.com> wrote:
> > https://gist.github.com/anonymous/4baa67aafd04555eb4e6
> >
> > I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> > Error message I got:
> > https://gist.github.com/anonymous/f0d4ec685d2432c80a1
> 
> The first gist is short enough that it easily could have been included
> inline in your message. The second gist is a 404 (looks like it may be
> short one hex digit).
> 
> I haven't used wxPython in a while and I've never used that ToasterBox
> widget, but I'll see what I can answer.
> 
> If you don't want any frames then you should probably use parent=None,
> not parent=wx.Frame(None), which creates a frame. Also, the purpose of
> the panel is unclear since it's never used.
> 
> When you say that you run it the next time, do you mean that you're
> running this script twice, as two separate processes, and getting
> different results? That seems strange. Or do you mean that you're
> invoking this code multiple times in the same Python process?

parent=None doesnt work, it gives error:


<code>
AttributeError                            Traceback (most recent call last)
C:\Users\Mike\Desktop\zz.py in <module>()
      5 app = wx.App()
      6 panel=wx.Panel(parent=wx.Frame(None))
----> 7 toaster = TB.ToasterBox(parent=None, tbstyle=TB.TB_COMPLEX, closingstyle=TB.TB_ONTIME)
      8 
      9 toaster.SetPopupPauseTime(3000)

C:\Users\Mike\AppData\Local\Enthought\Canopy\User\lib\site-packages\wx\lib\agw\toasterbox.pyc in __init__(self, parent, tbstyle, windowstyle, closingstyle, scrollType)
    135                                     wx.GetDisplaySize().GetHeight())
    136 
--> 137        parent.Bind(wx.EVT_ICONIZE, lambda evt: [w.Hide() for w in winlist])
    138 
    139        self._tb = ToasterBoxWindow(self._parent, self, self._tbstyle, self._windowstyle,

AttributeError: 'NoneType' object has no attribute 'Bind'
</code>

By running it the next time I meant that I am running this script twice as separate processes and I run it the second time only after first process has finished its execution.

[toc] | [prev] | [next] | [standalone]


#101780

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2016-01-15 20:51 +0000
Message-ID<mailman.32.1452891128.15297.python-list@python.org>
In reply to#101767
On 15/01/2016 17:05, Shiva Upreti wrote:
> https://gist.github.com/anonymous/4baa67aafd04555eb4e6
>
> I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> Error message I got:
> https://gist.github.com/anonymous/f0d4ec685d2432c80a1

I'm sorry that I can't help directly but you're more likely to get 
answers here gmane.comp.python.wxpython.

>
> There is one more issue. I am using canopy as my environment, and when i run it using canopy it works fine at least for the first time but when I run it using command prompt in windows 10, nothing happens, I get no errors and still it does not work.
>

Two problems, one is that Canopy is *NOT* main stream Python, it is part 
of the Enthought distibution, second is that "still it does not work" 
amongst other things is about as much use as a wet fart in a 
thunderstorm.  Please give us data that we can work with.

> Please help me solve these issues.
>

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#101792

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 16:58 -0800
Message-ID<c06d391b-5b64-4524-84d1-b508ba4218ca@googlegroups.com>
In reply to#101780
On Saturday, January 16, 2016 at 2:22:24 AM UTC+5:30, Mark Lawrence wrote:
> On 15/01/2016 17:05, Shiva Upreti wrote:
> > https://gist.github.com/anonymous/4baa67aafd04555eb4e6
> >
> > I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> > Error message I got:
> > https://gist.github.com/anonymous/f0d4ec685d2432c80a1
> 
> I'm sorry that I can't help directly but you're more likely to get 
> answers here gmane.comp.python.wxpython.
> 
> >
> > There is one more issue. I am using canopy as my environment, and when i run it using canopy it works fine at least for the first time but when I run it using command prompt in windows 10, nothing happens, I get no errors and still it does not work.
> >
> 
> Two problems, one is that Canopy is *NOT* main stream Python, it is part 
> of the Enthought distibution, second is that "still it does not work" 
> amongst other things is about as much use as a wet fart in a 
> thunderstorm.  Please give us data that we can work with.
> 
> > Please help me solve these issues.
> >
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

What kind of further details do you want? Please tell me and i will try my best to provide them.

[toc] | [prev] | [next] | [standalone]


#101830

FromMichael Torrie <torriem@gmail.com>
Date2016-01-15 23:47 -0700
Message-ID<mailman.52.1452998630.15297.python-list@python.org>
In reply to#101792
On 01/15/2016 05:58 PM, Shiva Upreti wrote:
> 
> What kind of further details do you want? Please tell me and i will try my best to provide them.

As always, post a small but complete example test program (no more than
20 lines of code) that has the problem.  Paste it in such a way that one
can copy and paste it into an editor and get a validly-formatted
program.  Also post the traceback you get when you run the test program
you created.  Another person has to be able to replicate the problem to
advise you. Often in the process of doing this, people find their own bugs.

[toc] | [prev] | [next] | [standalone]


#101788

FromDietmar Schwertberger <maillist@schwertberger.de>
Date2016-01-15 22:22 +0100
Message-ID<mailman.35.1452899331.15297.python-list@python.org>
In reply to#101767
On 15.01.2016 18:05, Shiva Upreti wrote:
> Please help me solve these issues.
Please decide first on which list or forum you want your questions to be 
answered. Once people find out that you are asking the same questions 
all over, the support will soon end.

Regards,

Dietmar

[toc] | [prev] | [next] | [standalone]


#101793

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 16:59 -0800
Message-ID<215909d8-f132-4d16-9406-58b067a5ddf1@googlegroups.com>
In reply to#101788
On Saturday, January 16, 2016 at 4:39:12 AM UTC+5:30, Dietmar Schwertberger wrote:
> On 15.01.2016 18:05, Shiva Upreti wrote:
> > Please help me solve these issues.
> Please decide first on which list or forum you want your questions to be 
> answered. Once people find out that you are asking the same questions 
> all over, the support will soon end.
> 
> Regards,
> 
> Dietmar

I am sorry, I didnt know about this. I will keep this in mind. Thank you.

[toc] | [prev] | [next] | [standalone]


#101789

FromShiva Upreti <katewinslet626@gmail.com>
Date2016-01-15 16:49 -0800
Message-ID<d5d18abe-e4e6-4ece-8723-36cd4aaae95d@googlegroups.com>
In reply to#101767
On Friday, January 15, 2016 at 10:35:57 PM UTC+5:30, Shiva Upreti wrote:
> https://gist.github.com/anonymous/4baa67aafd04555eb4e6
> 
> I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows some error and the toasterbox doesnt disappear from the screen itself(it should though).
> Error message I got:
> https://gist.github.com/anonymous/f0d4ec685d2432c80a1
> 
> There is one more issue. I am using canopy as my environment, and when i run it using canopy it works fine at least for the first time but when I run it using command prompt in windows 10, nothing happens, I get no errors and still it does not work.
> 
> Please help me solve these issues.

New link to error message, old one is giving 404:
http://pasted.co/f398a1e4

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web