Re: [Tutor] Self and class functions

2013-06-29 Thread Dave Angel
On 06/30/2013 12:10 AM, Phil wrote: On 30/06/13 11:41, Dave Angel wrote: Thank you Dave, Matthew and Steven for taking the time to reply. All hints are greatly appreciated. I'm attempting to access the GUI widgets. The buttonClicked slot does what I want but I'd like to access the widgets outs

Re: [Tutor] Self and class functions

2013-06-29 Thread Steven D'Aprano
On 30/06/13 08:36, Phil wrote: Thank you for reading this. I'm attempting to access the GUI widgets. The buttonClicked slot does what I want but I'd like to access the widgets outside of the class. My function setLabel doesn't work because self and ui are not known. What does "doesn't work"

Re: [Tutor] Need help appending data to a logfile

2013-06-29 Thread Dave Angel
On 06/29/2013 09:38 PM, Steven D'Aprano wrote: I haven't read this entire thread, but the bits I have read lead me to think that Matt has tangled himself up in a total confused mess. It's *not this hard* to write status messages to a log file, the log module does all the work. Can anyone w

Re: [Tutor] Self and class functions

2013-06-29 Thread Dave Angel
On 06/29/2013 06:36 PM, Phil wrote: Thank you for reading this. You should be telling us some things. I'll guess for you: You're using Python 3.3 with Qt for a gui, and Linux 12.04 for an OS. I'm attempting to access the GUI widgets. The buttonClicked slot does what I want but I'd like to

Re: [Tutor] Need help appending data to a logfile

2013-06-29 Thread Steven D'Aprano
On 30/06/13 10:51, Alan Gauld wrote: On 29/06/13 16:00, Matt D wrote: with tempfile.NamedTemporaryFile('a+t',) as tf: self.logfile = tf This could give problems. with guarantees to close the file at the end of the block. But you have assigned it to self.logfile. So when the fi

Re: [Tutor] Need help appending data to a logfile

2013-06-29 Thread Alan Gauld
On 29/06/13 16:00, Matt D wrote: with tempfile.NamedTemporaryFile('a+t',) as tf: self.logfile = tf This could give problems. with guarantees to close the file at the end of the block. But you have assigned it to self.logfile. So when the file is closed (and tempfile then delete

Re: [Tutor] Need help appending data to a logfile

2013-06-29 Thread Dave Angel
On 06/29/2013 08:26 AM, Matt D wrote: Matt probably read somewhere about an interface like tempfile.TemporaryFile where the file has no explicit name, and will be deleted from disk, and the space reused as soon as it is closed. I don't believe he's using such an interface, however. Yes

Re: [Tutor] Robot Radio in a linux Raspberry Pi

2013-06-29 Thread Dave Angel
On 06/29/2013 12:32 AM, Kirk Bailey wrote: ok, some months back I wrote about the program I wrote to perform the office of being a robot radio station in my windows desktop PC. well, I got it done and posted the program FOR WINDOWS on this list, and shut up. Then I got interested in the Raspberr