William O'Higgins Witteman wrote:
> Thank you. I found a similar solution myself while waiting. I was
> stuck with thinking about the output being a list of lists, but once I
> thought of it as a dictionary the solution came much more easily.
> Here's the code, including timestamp conversions:
>
Terry Carroll wrote:
> I'm pretty much just a dabbler in Python.
>
> Up to now I've mostly been doing line-oriented programs, but I have a
> small app I want to write that I think would be a good candidate to write
> as a GUI-based app.
>
> I'd like advice from the more seasoned programmers her
R. Alan Monroe wrote:
>> On Fri, 23 Mar 2007, Luke Paireepinart wrote:
>>
>
>
>> I've also thought of having a twist here for MP3 files, specifically,
>> distinguishing between the files' audio frames and identification info
>> frames, and checksumming only the audio portion; so that two ot
> On Fri, 23 Mar 2007, Luke Paireepinart wrote:
> I've also thought of having a twist here for MP3 files, specifically,
> distinguishing between the files' audio frames and identification info
> frames, and checksumming only the audio portion; so that two otherwise
> identical MP3 files with diffe
On Fri, Mar 23, 2007 at 05:31:51PM -0700, Bob Gailer wrote:
>William O'Higgins Witteman wrote:
>>I have a list of lists derived from a log file that I want to create a
>>summary of, but I am not sure of an approach to do what I need.
>>
>>Here's a sample of the data:
>>
>>[["user1","18/Mar/2007:07:
"Terry Carroll" <[EMAIL PROTECTED]> wrote
> I figure one way to do it is to write the nuts and bolts of it using
> plain
> old line oriented techniques; and then write the GUI, calling the
> functions already written.
Absolutely, taking care to put the code the GUI will use in separate
functions
"Jay Mutter III" <[EMAIL PROTECTED]> wrote
> 1.) Are there better ways to write this?
There are always other ways, as to which is better depends
on your judgement criteria. Your way works.
> 2.) As it writes out the one group to the new file for companies it
> is as if it leaves blank lines behi
"Che M" <[EMAIL PROTECTED]> wrote
>>Instead of using the class create an instance(aka object)
>>self.plotPanel = PlotPanel(mypoints,self.notebook1)
> This worked great, thanks! One question: you mention that in this
> way it
> is passing in the mypoints list and also the notebook1. Wh
William O'Higgins Witteman wrote:
> I have a list of lists derived from a log file that I want to create a
> summary of, but I am not sure of an approach to do what I need.
>
> Here's a sample of the data:
>
> [["user1","18/Mar/2007:07:52:38 -0400"],["user1","18/Mar/2007:07:52:40
> -0400"],["user2
Just to say thank you.
Over the last few months I have been asking a lot of dumb questions about
python (and qt on the qt mailing list) ... anyhow I finished my pet project,
all 5500 lines of it. I previously explained what it was but to recap ...
I developed a QT Python app that scans both con
>Instead of using the class create an instance(aka object)
>
>self.plotPanel = PlotPanel(mypoints,self.notebook1)
>
>That creates an instance passing the mypoints list in
>to youir init method along with the notebook1 that you
>pass when you create an instance later (see below).
This wor
Hi Terry,
Terry Carroll wrote:
> I'd like advice from the more seasoned programmers here: how do you
> approach a GUI-based app?
Approaches differ in formality and order of execution and opinions at
any point in time vary - and they vary with time as well. I'm assuming
this is a hobby-level pr
On Fri, 23 Mar 2007, Luke Paireepinart wrote:
> In either case, what you're intending to end up with is a decoupling of
> the GUI code and the program logic.
Absolutely. I try to do that in any case, even in non-GUI.
[other good advice snipped]
> > (If it matters: I'm going to use wxPython;
Terry Carroll wrote:
> I'm pretty much just a dabbler in Python.
>
> Up to now I've mostly been doing line-oriented programs, but I have a
> small app I want to write that I think would be a good candidate to write
> as a GUI-based app.
>
> I'd like advice from the more seasoned programmers here:
Script i have to date is below and
Thanks to your help i can see some daylight but I still have a few
questions
1.) Are there better ways to write this?
2.) As it writes out the one group to the new file for companies it
is as if it leaves blank lines behind for if I don't have the elif len
I'm pretty much just a dabbler in Python.
Up to now I've mostly been doing line-oriented programs, but I have a
small app I want to write that I think would be a good candidate to write
as a GUI-based app.
I'd like advice from the more seasoned programmers here: how do you
approach a GUI-based
"Che M" <[EMAIL PROTECTED]> wrote
> Thank you, Alan. I started by adding a method called addPoints()
> to my
> class as you recommend. But now I don't know how to pass a list of
> points
> to the addPoints() method.
You need to create an instance of a PlotPanel.
> class PlotPanel(wx.lib.plo
Thank you, Alan. I started by adding a method called addPoints() to my
class as you recommend. But now I don't know how to pass a list of points
to the addPoints() method. Here's the relevant code, adding in your
suggestions:
class PlotPanel(wx.lib.plot.PlotCanvas):
def __init__(self,
Got it - it needs the blank line to signal that code block has ended.
Thanks
On Mar 22, 2007, at 3:05 PM, Jason Massey wrote:
In the interpreter this doesn't work:
>>> f = open(r"c:\python24\image.dat")
>>> line = f.readline()
>>> while line:
... line = f.readline()
... f.close()
Traceback
Andre;
Thanks again for the assistance.
I have corrected the splitlines error and it works ( well that part
of anyway) correctly now.
On Mar 23, 2007, at 5:30 AM, Andre Engels wrote:
2007/3/22, Jay Mutter III <[EMAIL PROTECTED]>:
I wanted the following to check each line and if it ends in
Hi Tony,
Thank you very much for your pointer. I think I understand what are you
explaining to me. Do you mind give me some code examples? I am still trying
to grasp the gui programming overall. And it is really over my head. I
really appreciate your help. Thank you
-Ben
On 3/23/07, Tony Cappel
Lars Erik Gullerud wrote:
> Hello list,
>
> I have the following problem; I have a list with an unknown number of
> strings, like so:
>
>MyList = ['string1', 'string2', 'string3'..'stringN']
>
> Now, I need to call a procedure from a 3rd party module (which is just a
> wrapper around a C l
Hello list,
I have the following problem; I have a list with an unknown number of
strings, like so:
MyList = ['string1', 'string2', 'string3'..'stringN']
Now, I need to call a procedure from a 3rd party module (which is just a
wrapper around a C library), where each of these strings must be
First thanks for all of the help
I am actually starting to see the light.
On Mar 22, 2007, at 7:51 AM, Kent Johnson wrote:
> Jay Mutter III wrote:
>> Kent;
>> Thanks for the reply on tutor-python.
>> My data file which is just a .txt file created under WinXP by an
>> OCR program contains lines
"Carson Wendy" <[EMAIL PROTECTED]> wrote in
> ok, i just started python and i'm stuck on this, could use some help
> :D
> a='test'
> def f():
> a=a+'gg'
Welcome to the world of Python.
As a rule when you have a problem tell us what the problem is,
we aren't psychic. Specifically, if you get
On 3/21/07, p l <[EMAIL PROTECTED]> wrote:
> im a new python programmer and iv been given a task to get as much details
> that i can on my system memory...
Since this is very low level hacking, you need to specify which
operating system you use.
--
- Rikard - http://bos.hack.org/cv/
_
Carson Wendy wrote:
> ok, i just started python and i'm stuck on this, could use some help
> :D
> a='test'
> def f():
> a=a+'gg'
Look for the definition of 'global'
And try this:
>>> a = 'test'
>>> def f()
global a
a = a + 'gg'
print a
>>>f()
--
Senthil
Dish of
Jay Mutter III wrote:
> Thanks for the response
> Actually the number of lines this returns is the same number of lines
> given when i put it in a text editor (TextWrangler).
> Luke had mentioned the same thing earlier but when I do change read to
> readlines i get the following
>
>
> Tracebac
Carson Wendy wrote:
> ok, i just started python and i'm stuck on this, could use some help :D
> a='test'
> def f():
> a=a+'gg'
What is your question? What happens when you run this code? What did you
expect to happen? What are you trying to do?
Kent
_
2007/3/23, Jay Mutter III <[EMAIL PROTECTED]>:
On Mar 23, 2007, at 5:30 AM, Andre Engels wrote:
2007/3/22, Jay Mutter III < [EMAIL PROTECTED]>:
>
> I wanted the following to check each line and if it ends in a right
> parentheses then write the entire line to one file and if not then
> write t
On Mar 23, 2007, at 5:30 AM, Andre Engels wrote:
2007/3/22, Jay Mutter III <[EMAIL PROTECTED]>:
I wanted the following to check each line and if it ends in a right
parentheses then write the entire line to one file and if not then
write the line to anther.
It wrote all of the ) to one file and
Jeff Peery wrote:
> ... what is '*' in '*temp'? thanks!
Say you have a function of 3 arguments:
In [1]: def add(a, b, c):
...: return a+b+c
Normally to call it, you just specify the three arguments:
In [2]: add(1, 2, 3)
Out[2]: 6
Suppose the arguments were already in a list, what would y
ok, i just started python and i'm stuck on this, could use some help :D
a='test'
def f():
a=a+'gg'
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
2007/3/22, Jay Mutter III <[EMAIL PROTECTED]>:
I wanted the following to check each line and if it ends in a right
parentheses then write the entire line to one file and if not then
write the line to anther.
It wrote all of the ) to one file and the rest of the line (ie minus
the ) to the other
"Che M" <[EMAIL PROTECTED]> wrote
> I've been trying to make basic plots (line graphs)
> using the pyplot module in wxPython.
> class PlotPanel(wx.lib.plot.PlotCanvas):
> def __init__(self, *args, **kwargs):
> wx.lib.plot.PlotCanvas.__init__(self, *args, **kwargs)
> self.Dra
35 matches
Mail list logo