> A common way to trigger UI actions is a button whose callback calls that.
> Or you can bind in an event hook for closing the window.
>
> in __init__ add this line -
> self.Bind(wx.EVT_CLOSE, self.onExit)
>
>
> def onExit(self, event):
>'''Run when closing'''
>self.logfile.close()
>
Matt D wrote:
> >
> >
> > Also note, that unless you do self.logfile.close() it is not guaranteed
> > that the data is being written to file. I prefer to use the following
> > idiom for Python 2.6+ (might be in 2.5, but not sure offhand when it was
> > added).
> >
> > with open('filename.txt', 'a'
> Everything Dave Angel said applies.
>
> You can sort the keys by doing and sorting the keys and then logging.
> That should ensure field order.
>
> for k in sorted(self.fields):
> v = self.fields[k]
>
>
> Also note, that unless you do self.logfile.close() it is not guaranteed
> that the d
Matt D wrote:
> > There are other ways a script might change the current directory. For
> > example, some naive scripts use os.chdir()
> >
> > But how is it you don't know what the current directory was when the
> > code ran? A simply pwd can tell you, if your prompt doesn't already
> > reveal i
On 06/13/2013 03:39 AM, Alan Gauld wrote:
> On 13/06/13 05:24, Matt D wrote:
>
>> I already told you i found the file? why would someone else be running
>> the program?
>
> Because it does something useful?
> Most pro programmers write programs for other people to use.
> Even an amateur may be c
On 13/06/13 05:24, Matt D wrote:
I already told you i found the file? why would someone else be running
the program?
Because it does something useful?
Most pro programmers write programs for other people to use.
Even an amateur may be creating something for their family use.
If someone other
On 06/12/2013 09:54 PM, Dave Angel wrote:
> On 06/12/2013 09:14 PM, Matt D wrote:
>> On 06/12/2013 09:02 PM, Dave Angel wrote:
>>> On 06/12/2013 08:46 PM, Matt D wrote:
On 06/12/2013 05:59 PM, Dave Angel wrote:
> On 06/12/2013 05:32 PM, Matt D wrote:
>>>
>>>
>>>
>> Hey,
>> if
On 06/12/2013 09:23 PM, Matt D wrote:
There are other ways a script might change the current directory. For
example, some naive scripts use os.chdir()
But how is it you don't know what the current directory was when the
code ran? A simply pwd can tell you, if your prompt doesn't already
rev
> There are other ways a script might change the current directory. For
> example, some naive scripts use os.chdir()
>
> But how is it you don't know what the current directory was when the
> code ran? A simply pwd can tell you, if your prompt doesn't already
> reveal it.
>
>
hey i found the
On 06/12/2013 08:46 PM, Matt D wrote:
On 06/12/2013 05:59 PM, Dave Angel wrote:
On 06/12/2013 05:32 PM, Matt D wrote:
Hey,
if i put:
self.logfile = open('logfile.csv', 'w')
in the .py file, within the 'class TrafficPane', then shouldn't
logfile.csv be written to the directory the .
On 06/12/2013 05:59 PM, Dave Angel wrote:
> On 06/12/2013 05:32 PM, Matt D wrote:
>> On 06/10/2013 12:23 PM, Prasad, Ramit wrote:
>>> Matt D wrote:
Ramit Prasad wrote:
>>> Scrolled panel is just a graphical container that allows for
>>> scrolling inside,
>>> but it is the window th
On 06/12/2013 05:32 PM, Matt D wrote:
On 06/10/2013 12:23 PM, Prasad, Ramit wrote:
Matt D wrote:
Ramit Prasad wrote:
Scrolled panel is just a graphical container that allows for scrolling inside,
but it is the window that scrolls not widgets inside it. This of it like
a webpage that scrolls. I
On 06/10/2013 12:23 PM, Prasad, Ramit wrote:
> Matt D wrote:
>> Ramit Prasad wrote:
> Scrolled panel is just a graphical container that allows for scrolling
> inside,
> but it is the window that scrolls not widgets inside it. This of it like
> a webpage that scrolls. If you use we
Matt D wrote:
> Hello,
>
> I am using an open source wxPython GUI that I like very very much. I
> have ideas about some modifications I need but I cannot be bothering the
> author too much so I must learn some very specific things about Python
> in order to make the modification myself. First, I
On 03/06/13 15:01, Matt D wrote:
I am using an open source wxPython GUI that I like very very much. I
have ideas about some modifications I need but I cannot be bothering the
author too much so I must learn some very specific things about Python
OK, we can help on the python bits but not so mu
Hello,
I am using an open source wxPython GUI that I like very very much. I
have ideas about some modifications I need but I cannot be bothering the
author too much so I must learn some very specific things about Python
in order to make the modification myself. First, I need some help
understandi
16 matches
Mail list logo