> A list of lists is the most logical construction.
> But -- you don't need to assemble the rows separately --
> this works too:
> >>> my_matrix_as_lists = [ [4, 6, 8, 1],\
> ... [2, 5, 1, 3],\
> ... [2, 1, 2, 8] ]
And you don't need the line continuation characters either.
Because Python ca
On Dec 19, 2004, at 06:16, Jacob S. wrote:
Would this work for you?
a = ['Name = stuff','CGTATAGCTAGCTA','Name = stuff','CGATATGCCGGCTA']
for index,thing in enumerate(a):
if "Name=" in thing:
del a[index]
I know, that it might be slow, but I thought that maybe it would hold
its
own bec
Max Noel wrote:
On Dec 19, 2004, at 06:16, Jacob S. wrote:
Would this work for you?
a = ['Name = stuff','CGTATAGCTAGCTA','Name = stuff','CGATATGCCGGCTA']
for index,thing in enumerate(a):
if "Name=" in thing:
del a[index]
A faster way to do this would be to use something like:
if thi
> > I find the easiest way is to create an PhotoImage object attach
> > the graphic file(jpg,bmp,gif) to that and assign the PhotoImage
> > object to the Button.image property. You can "animate" the image
> > by simply reassigning the file to the underlying PhotoImage
onject.
> Thanks, but a pract
You've got it right Brian. It is this ability to change the way
*existing* code works that makes OOP more than a neat way to
package data and functions. This is polymorphism at its
most powerful.
Its why in a C++/Java world the convention is to write
hook methods that are called by the public meth
On Mon, 20 Dec 2004 18:21:13 +1300, Liam Clarke <[EMAIL PROTECTED]> wrote:
> from Tkinter import *
> import Image, ImageTk
> root = Tk()
> img = Image.open('SonicCruiser.gif')
> phi = ImageTk.PhotoImage(img)
> button = Button(root, image=phi)
> button.pack()
> root.mainloop()
Thank you !!
But I d
Alan Gauld said unto the world upon 2004-12-20 09:27:
Its another reason why you should never refer to
an object or method *calling* another method
(as Pilgrim does). Rather think of the method
sending a *message* to the self object which
invokes the appropriate method. This decoupling
of message
Okay, here's the code.
I am completely open to suggestions as this is my first dabbling in Tk.
Please look over it when you have time.
I have a couple of questions.
1) How do I change the title of the window?
2) Why does a window pop up saying something like error, the memory could
not be "read".
Duh, whack myself on the head a few times.
Thanks,
Jacob
> Max Noel wrote:
> >
> > On Dec 19, 2004, at 06:16, Jacob S. wrote:
> >
> >> Would this work for you?
> >>
> >> a = ['Name = stuff','CGTATAGCTAGCTA','Name = stuff','CGATATGCCGGCTA']
> >> for index,thing in enumerate(a):
> >> if "Name=
That's interesting, I hadn't thought of that!
Jacob
> Jacob S. wrote:
>
> > Would this work for you?
> >
> > a = ['Name = stuff','CGTATAGCTAGCTA','Name = stuff','CGATATGCCGGCTA']
> > for index,thing in enumerate(a):
> > if "Name=" in thing:
> > del a[index]
> >
> > I know, that it mig
On Sat, 18 Dec 2004, Jacob S. wrote:
> I think I'm going to burst out in tears. Mike Hansen gave the solution
> to the very problem I'm having, yet, when I used the console version and
> deleted the custom color theme, it stopped giving me error messages, but
> it still won't start up without th
"Jacob S." <[EMAIL PROTECTED]>
> Gee,
> I think I'm going to burst out in tears.
> Mike Hansen gave the solution to the very problem I'm having, yet, when
> I
> used the console version and deleted the custom color theme, it stopped
> giving me error messages, but it still won't start up without
On Sun, 19 Dec 2004, Bugra Cakir wrote:
> I want to create a matrix in Python. For example 3x4 how can i
> create this? thanks
Hi Bugra,
Just for reference, here's the relevant FAQ about how to do matrices in
Python:
http://python.org/doc/faq/programming.html#how-do-i-create-a-multidimension
Hi
I've written some unittests using the unittest module for my
'DNA-class'. This class can cope with almost every input, but with no
'numbers' whatsoever. Well, one of the tests is:
class TestFunctions(unittest.TestCase):
...
def test__init__(self):
"""testing whether __init__ w
On Sun, 19 Dec 2004, Bugra Cakir wrote:
> I want to create a matrix in Python. For example 3x4 how can i
> create this? thanks
Just for the heck of it would you tell us what you want to do with the
matrix? Sometimes there are interesting alternate ways to do things that
might not be obvious to a
Christian Meesters wrote:
Hi
I've written some unittests using the unittest module for my
'DNA-class'. This class can cope with almost every input, but with no
'numbers' whatsoever. Well, one of the tests is:
class TestFunctions(unittest.TestCase):
...
def test__init__(self):
"""
> > Its another reason why you should never refer to
> > an object or method *calling* another method
> > (as Pilgrim does). Rather think of the method
> > sending a *message* to the self object which
> > invokes the appropriate method.
> The contrast you suggest between calling a method and sendi
Alan Gauld said unto the world upon 2004-12-20 15:51:
I hope that short history of OOP clarifies rather than
confuses! :-)
Alan G.
Thanks for that Alan. Seems to clarify thing to me ;-)
Best,
Brian vdB
___
Tutor maillist - [EMAIL PROTECTED]
http://mail
Ah, hah!
Okay, everyone! It took two things.
1) Delete .idlerc directory
2) Uninstall and reinstall python2.4
Why I had to do step two is beyond me, but I've got it settled now!
Thank you,
Jacob Schmidt
>
> "Jacob S." <[EMAIL PROTECTED]>
>
> > Gee,
> > I think I'm going to burst out in tears.
>
On Mon, 20 Dec 2004, Jacob S. wrote:
> 1) Delete .idlerc directory
> 2) Uninstall and reinstall python2.4
Hi Jacob,
Ok, so there was probably something really screwy with the stuff in
.idlerc.
Can you send me a tarball or zip of it in private email? I just want to
make sure that the issue t
Hi,
I'm trying to figure out how to work with Tix. The lack of examples
and avalaibility of documentation for TCL only do not help :-(
It does not work because when I start the program, the red and gren
buttons start blinking betweeb 2 or 3 different places, no matter what
the tab is.
Here is th
Hi,
I'm trying to implement a reasonably efficient table data structure, but ith a
few quirks...
The application I'm building is a CGI program which allows users to view a
large table of data. In addition, users can restrict the data shown. Some
sample data might look like this: (note you'll
22 matches
Mail list logo