[Tutor] Running two applications at once

2009-08-28 Thread Dirk Wangsadirdja
hi, I'm new to python, and I'm starting with Python 3.1 directly. I have been learning python for about 2 weeks now. And I have few questions. Is it possible if I run two applications at once? For example, if I make a clock/timer application with alarm etc, then I want exercise with my python,

[Tutor] Running two applications at once

2009-08-28 Thread Dirk Wangsadirdja
hi, I'm new to python, and I'm starting with Python 3.1 directly. I have been learning python for about 2 weeks now. And I have few questions. Is it possible if I run two applications at once? For example, if I make a clock/timer application with alarm etc, then I want exercise with my pytho

[Tutor] Displaying .jpg in Tkinter (Python 3.1)

2009-08-31 Thread Dirk Wangsadirdja
hi, is there anyway to display a .jpg (or other type) images in Tkinter with Python 3.1? From what I read here in the forum, for Python 2.6 I could use the PIL package. But the PIL packages doesnt support Pyton 3.1 yet (from what I read on the PIL website). Are there perhaps other packages

Re: [Tutor] Displaying .jpg in Tkinter (Python 3.1)

2009-08-31 Thread Dirk Wangsadirdja
Hi, with Tkinter, you can only display GIF and PGM/PPM images. when you try to create an PhotoImage object from another file format (JPG for example), it will give you an error. Alan Gauld wrote: "Dirk Wangsadirdja" wrote is there anyway to display a .jpg (or other type) images

Re: [Tutor] How to iterate through unicode string.

2009-09-04 Thread Dirk Wangsadirdja
Hi allen (and perhaps this goes also for others), just a suggestion, maybe when we post a problem, we should also mention the python version that we use. Sometimes, different version of python would give different results. I tried it with Python 3.1 (python 3.x uses unicode for string) and P

Re: [Tutor] Help deciding between python and ruby

2009-09-04 Thread Dirk Wangsadirdja
Hi, I've never learned ruby, but from what I read, ruby is a pure OOP language, and if you are going to do a lot of web creation, then ruby on rails is a good one. What I can advice is, if you choose to stick with python, perhaps you shouldn't use python 3.x, but use python 2.5 (from what I

Re: [Tutor] (no subject)

2009-09-10 Thread Dirk Wangsadirdja
I tested it and it works. But I dont understand why it works. Can someone please explain it further? Thanks. Alan Gauld wrote: "C or L Smith" wrote Or (and I'll duck after I pass on what I just happened across today on the web): ### for i in range(len(word)): print word[~i] ### Neat

Re: [Tutor] Sorting 2-d data

2009-09-13 Thread Dirk Wangsadirdja
Lie Ryan wrote: if you have data like this: mylist = [ [3, 4, 3, 2, 1], [2, 1, 1, 1, 1], [4, 2, 2, 1, 2], [1, 3, 1, 1, 1], ] you can use mylist.sort(key=lambda x: x[0]) sorted(mylist, key=lambda x: x[0]) works as well if you need a new list I have a further question. If I wa