On Mon, Jun 24, 2013 at 3:48 PM, Matt D <md...@nycap.rr.com> wrote:

> >     def __init__(self, data):
> >         wx.PyEvent.__init__(self)
> >         # this line *binds* this class to a certain type of event,
> > wxDATA_EVENT
> >         self.SetEventType (wxDATA_EVENT)
> >         # and this is the actual data
> >         self.data = data
> >         with open('mypicklelog.txt','a') as log:
> >             log.write(self.data)
>

Jumping in a little late here, but: do you do anything else, later on, with
self.data?  If not, you could skip the "self.data = data" line and just do
your thing with "data"...

If you ARE doing something with it later on, of course, please disregard.
I just wanted to point out that not everything needs to be persisted, if
you're only using it once.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to