[Tutor] enumerate offset?

2005-04-29 Thread Chris Smith
Does anybody else ever run into the case of using enumerate on a slice but then wish that the original list indices were being returned instead of the ones starting at zero? I would like to see an offset argument that could be used with enumerate: ### l=range(5) for i,li in enumerate(l[3:]):

[Tutor] tokenize row numbering

2005-04-29 Thread Chris Smith
I got over my intimidation with tokenize and learned to use it to strip comments from code files. In the process, I learned that the tuples that it returns for the position in the code of various tokens is 1-based in the row rather than 0-based, so the tuple pair (3,1),(3,2) would be the start

[Tutor] Re: input()

2005-04-29 Thread Chris Smith
On Friday, Apr 29, 2005, at 09:48 America/Chicago, [EMAIL PROTECTED] wrote: Hello and thanks in advance. I am trying to prompt the user for some input. I need three values from the user so,I used input() like so; Matrix = input("Matrix=") error=input("error=") alpha= input("alpha=") us

Re: [Tutor] input()

2005-04-29 Thread Alan Gauld
> Matrix = input("Matrix=") > error=input("error=") > alpha= input("alpha=") > using Macpython it works fine but when I use a terminal all I get is > a blank line. Can you tell us a bit more about how you areusing MacPython and the terminal? Macpython has a console which presents a Python prom

RE: [Tutor] Issue with "Entry"/GUI/PIL

2005-04-29 Thread Alberto Troiano
Replace the 0.0 for only 0 But you have a problem. You are inserting the question and that's what the if clause analyze so it will be always wrong you have to add another Entry and a submit button so it will analyze the result of the second Entry Regards Alberto From: Brian Wurtzel <[EMAIL PROT

Re: [Tutor] wxpython error when upgrading?

2005-04-29 Thread Danny Yoo
On Thu, 28 Apr 2005, Jeff Peery wrote: > hello, I recently upgraded my wxpython to 2.5, now I get an error > message when I try to edit a dialog in the boa constructor that says : > collection body not in init, body, fin form - anyone have an idea what > this means? thanks. Hi Jeff, This sound

Fwd: [Tutor] cPickle (Joseph Q.)

2005-04-29 Thread Max Noel
Begin forwarded message: From: Joseph Quigley <[EMAIL PROTECTED]> Date: April 29, 2005 17:16:22 BST To: Max Noel <[EMAIL PROTECTED]> Subject: Re: [Tutor] cPickle (Joseph Q.) I tried that and it doesn't work! I type the name and it just sits there! Here's the code: # variables name = "JOTEX " versn

Re: [Tutor] cPickle (Joseph Q.)

2005-04-29 Thread Max Noel
On Apr 29, 2005, at 04:48, Joseph Quigley wrote: Hi all, How could I have the user name his file? I learned that I type file_name = "foo.bar" How could I make it that the use could name it "hello.hi"? Thanks, Joe Well, all you have to do is have the user input a string, and use this st

[Tutor] Issue with "Entry"/GUI/PIL

2005-04-29 Thread Brian Wurtzel
Please ignore the rest of the code, except for the highlighted part (or the line 'ent1=Entry(topf, width=25)' to line 'ent1.insert(INSERT, wrong, if you cannot see the color). You can copy this into Python and make sure you have the GIF file in the same dir. Also, make sure that you have PIL instal

Re: [Tutor] Re Help with this script

2005-04-29 Thread John Carmona
Hi Alan, I did not receive personally your last email but I have read it on the forum. OK i understand now what you were talking about, sorry it took such a long time for me to see the solution, the good thing about it is that I am learning tons. I will probably post soon again once I hit a wa

[Tutor] cPickle (Joseph Q.)

2005-04-29 Thread Joseph Quigley
Hi all, How could I have the user name his file? I learned that I type file_name = "foo.bar" How could I make it that the use could name it "hello.hi"? Thanks, Joe ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/

Re: [Tutor] Python and ICQ??

2005-04-29 Thread Mark Kels
On 4/29/05, tanja pislar <[EMAIL PROTECTED]> wrote: > try pyICQ-t, (it's an ICQ transport for jabber implemented in python) > http://pyicq-t.blathersource.org/ > > regards, > tanja Thanks, but its to complicated for my needs. What I need is a simple module that will allow me to connect to ICQ and

Re: [Tutor] input()

2005-04-29 Thread Ewald Ertl
Hi! I don't have a Mac and so I don't know Macpython. on Fri, 29 Apr 2005 07:55:20 -0500 Servando Garcia <[EMAIL PROTECTED]> wrote : - Servando Garcia > Hello and thanks in advance. Servando Garcia >

[Tutor] input()

2005-04-29 Thread Servando Garcia
Hello and thanks in advance. I am trying to prompt the user for some input. I need three values from the user so,I used input() like so; Matrix = input("Matrix=") error=input("error=") alpha= input("alpha=") using Macpython it works fine but when I use a terminal all I get is a blank line. Wh

Re: [Tutor] Python and ICQ??

2005-04-29 Thread tanja pislar
try pyICQ-t, (it's an ICQ transport for jabber implemented in python) http://pyicq-t.blathersource.org/ regards, tanja On 4/28/05, Mark Kels <[EMAIL PROTECTED]> wrote: > Hi list ! > Does anyone here knows of a way to connect to ICQ with Python? > > Thanks in advance. > -- > 1. The day Microsoft