On 30/06/13 16:42, Matt D wrote:
im sorry i don't understand how to pass the file name from the open
dialog into the update method? I'm sorry i just don't get it. so if
the user opened file is 'handle' like this?:
OK, technically you probably donb;t want to pasws it into the metjod but
to
On 30/06/13 15:04, Matt D wrote:
that sounds ideal, but i have not found a way to pass the user selected
file into the loop that writes the data without opening another file.
Don;t pass the file pass the fgile *name*
Then inside the update method open the file(in append mode)
and write the lat
On 30/06/13 04:41, Matt D wrote:
So i have a program that gets pickled data from a thread and displays
the data (9 strings) in TextCtrl fields in the UI.
The fact that it is a UI is largely irrelevant apart from the
fact that it forces an event driven architecture.
When the pickle is
receiv
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
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
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
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
On 06/28/2013 08:04 PM, Alan Gauld wrote:
On 28/06/13 22:25, Matt D wrote:
Python UI. I have a thread that waits on new data and when it comes in
it gets displayed in TextCtrl fields. every time this happens my logger
puts those values into a text file one row at a time.
this how i open and
On 28/06/13 22:25, Matt D wrote:
Python UI. I have a thread that waits on new data and when it comes in
it gets displayed in TextCtrl fields. every time this happens my logger
puts those values into a text file one row at a time.
this how i open and the file for logging data:
# open a f
On 28/06/13 20:54, Matt D wrote:
def openFile(self, evt):
with wx.FileDialog(self, "Choose a file", os.getcwd(), "",
"*.txt*", wx.SAVE) as dlg:
if dlg.ShowModal() == wx.ID_OK:
path = dlg.GetPath()
mypath = os.path.basename(path)
On 28/06/13 23:18, Matt D wrote:
what if i did some thing like this i saw on stackoverflow:
f = open("bigfile.txt", "w")
That clears any existing content of bigfile.txt, and opens it for writing. Do
you intend to clear the content?
for tempfile in tempfiles:
What is in tempfiles? A list
On 06/28/2013 07:27 AM, Matt D wrote:
As for the shutil.copy() function, how complex can it be? It takes two
file names, source and destination. It does not need a with statement
since it wants strings, not file handles.
You might get into trouble on some OS's with the source file already
o
On 06/27/2013 05:09 PM, Matt D wrote:
On 06/27/2013 12:54 PM, Dave Angel wrote:
On 06/27/2013 12:33 PM, Matt D wrote:
I forgot to mention i have the 'with open(mypath, "a") as f: commented
out because it was making an indentation error that i could not fix.
It was indented, and shoul
On 06/27/2013 12:33 PM, Matt D wrote:
I forgot to mention i have the 'with open(mypath, "a") as f: commented
out because it was making an indentation error that i could not fix.
It was indented, and should not have been. The extra indentation
FOLLOWS the with statement, it's not correc
On 06/27/2013 10:55 AM, Matt D wrote:
On 06/27/2013 10:36 AM, Matt D wrote:
You asked about a "save-as" feature. Why isn't that as simple as
copying the current contents of the saved csv file? Or do you not know
how you would go about copying?
Hi. So I have the logger working, meaning t
On 06/24/2013 05:57 PM, Dave Angel wrote:
> On 06/24/2013 05:39 PM, Matt D wrote:
>>
>>> But what he's doing has nothing to do with logging. He's just using
>>> that word.
>>>
>>>
>> Right, I'm not doing a debugging thing. Just trying to create a log of
>> data that has been passed into the displ
On 06/24/2013 05:39 PM, Matt D wrote:
But what he's doing has nothing to do with logging. He's just using
that word.
Right, I'm not doing a debugging thing. Just trying to create a log of
data that has been passed into the display of this program. Since I
started trying to use the array t
On 06/17/2013 02:20 PM, Lukáš Němec wrote:
Or even better, use python moto, dont re-invent the wheel, so use built
in library logging, read the docs for it, or if you want, I can send you
some examples how to work it, it takes some time to figure out properly...
But what he's doing has
Dne 17. 6. 2013 20:17, Dave Angel napsal(a):
On 06/17/2013 01:36 PM, Matt D wrote:
Hey,
I wrote some simple code to write data to a logfile and it works pretty
well (thanks guys). Now my problem is that every time i run the program
the old logfile.txt is overwritten. I need to be able to stop
Peter Otten wrote:
> Matt D wrote:
>
> > Hey,
> > I wrote some simple code to write data to a logfile and it works pretty
> > well (thanks guys). Now my problem is that every time i run the program
> > the old logfile.txt is overwritten.
>
> The help() function in the interactive interpreter is
On 17 June 2013 17:57, Dave Angel wrote:
>> Well, although I would like to see my name in lights, I didn't
>> discover it, Dave did, so that would be dishonest ;')
>>
>
> http://bugs.python.org/issue18249
> filed at 8:55 pm
Looks like you've got a quibble on that. But the point is, it doesn't
fu
On Mon, Jun 17, 2013 at 5:43 PM, Dave Angel wrote:
> But in 3.3, it says:
> Help on built-in function close:
>
> close(...)
>
> with no more explanation.
The category "built-in function" here doesn't mean it's in the
builtins namespace. It means it's a function or method from an
extension module
On 06/17/2013 08:07 PM, Jim Mooney wrote:
On 17 June 2013 16:04, Mark Lawrence wrote:
You now have an opportunity to expand your knowledge of the Python
infrastructure by raising your first bug report to get this fixed. I look
forward to seeing your effort on the bug tracker mailing list.
On 17 June 2013 16:04, Mark Lawrence wrote:
>
> You now have an opportunity to expand your knowledge of the Python
> infrastructure by raising your first bug report to get this fixed. I look
> forward to seeing your effort on the bug tracker mailing list.
Well, although I would like to see my n
On 17/06/2013 23:39, Jim Mooney wrote:
But in 3.3, it says:
Help on built-in function close:
close(...)
with no more explanation.
Hmm, I thought close in 3.3 was a method of the file handle, not a
builtin function. Have I
missed something? I assume all builtin functions do not need an object
> But in 3.3, it says:
> Help on built-in function close:
>
> close(...)
>
> with no more explanation.
Hmm, I thought close in 3.3 was a method of the file handle, not a
builtin function. Have I
missed something? I assume all builtin functions do not need an object
dot prefix, and close needs the
On 06/17/2013 05:17 PM, Jim Mooney wrote:
On 17 June 2013 11:30, Peter Otten <__pete...@web.de> wrote:
The help() function in the interactive interpreter is a good tool hunt for
help on features of functions and classes. For example:
I tripped on Python help a couple of times, since I'm used
On 17 June 2013 11:30, Peter Otten <__pete...@web.de> wrote:
> The help() function in the interactive interpreter is a good tool hunt for
> help on features of functions and classes. For example:
I tripped on Python help a couple of times, since I'm used to
easy-living GUI help, so here is a bit
Matt D wrote:
> Hey,
> I wrote some simple code to write data to a logfile and it works pretty
> well (thanks guys). Now my problem is that every time i run the program
> the old logfile.txt is overwritten.
The help() function in the interactive interpreter is a good tool hunt for
help on fea
On 06/17/2013 01:36 PM, Matt D wrote:
Hey,
I wrote some simple code to write data to a logfile and it works pretty
well (thanks guys). Now my problem is that every time i run the program
the old logfile.txt is overwritten. I need to be able to stop and start
the program without overwriting, or
30 matches
Mail list logo