Re: [Tutor] what does the warning indicate?

2006-06-22 Thread Carlos Daniel Ruvalcaba Valenzuela
Most probably you are using Python on Windows, on Unix-like system there is a "home" for each user where the user files reside, normally HOME on windows must point to something like c:\Documents and Settings\Username, are you using Python on Windows 98? Otherwise it may be a problem with the envir

[Tutor] what does the warning indicate?

2006-06-22 Thread devayani barve
Hi!! I'm new to python and just trying to play around, when I run my program in the interactive shell before executing the program it shows the following warning :    Warning: HOME environment variable points to H: but the path does not exist. RESTART ===

Re: [Tutor] Is this correct syntax for what I want?

2006-06-22 Thread Terry Carroll
On Thu, 22 Jun 2006, Nathan Pinno wrote: > I want to be able to add and subtract from a number in a tuple in a > list. Is this the correct syntax? > > letterlist[x] = letterlist[x] + amount # for addition > > letterlist[x] = letterlist[x] - amount # for subtraction Try it.

[Tutor] [ANN] RUR-PLE version 0.9.9

2006-06-22 Thread Andre Roberge
Roberge's Used Robot: a Python Learning Environment Version 0.9.9 of RUR-PLE has been released. It can be found at: https://sourceforge.net/project/showfiles.php?group_id=125834 RUR-PLE should work properly on all major platforms (Mac, Linux and Windows) in 3 different languages (English, French

[Tutor] MySQLdb: cant get '... where field in %s' to work for string sequences

2006-06-22 Thread Justin Ezequiel
how can I get 'select ... from ... where field in %s' to work for sequences of strings? sequences of integers works just fine import MySQLdb DBCRED = {'host': 'localhost', 'user': 'userjustin', 'passwd': 'passwdjustin', 'db': 'dbjustin'} ARTICLES = ('XXX9', 'ABZ2') PIDS = (2937

[Tutor] Is this correct syntax for what I want?

2006-06-22 Thread Nathan Pinno
I want to be able to add and subtract from a number in a tuple in a list. Is this the correct syntax?   letterlist[x] = letterlist[x] + amount # for addition   letterlist[x] = letterlist[x] - amount # for subtraction   If this is not correct, what is the correct syntax?   Thanks, Nathan Pinn

[Tutor] A few more notes on Python interfaces

2006-06-22 Thread Dave Kuhlman
Several weeks ago, there was a discussion on this list about the use of interfaces in Python. That motivated me to write up some notes on Python interfaces, in part to force myself to learn a bit more about it. Needless to say, my notes benefited much from the comments on this list. You can find

Re: [Tutor] Escape sequences

2006-06-22 Thread David Heiser
That worked just dandy. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Johnson Sent: Thursday, June 22, 2006 1:03 PM Cc: tutor@python.org Subject: Re: [Tutor] Escape sequences David Heiser wrote: > I have code that assigns escape sequence

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Bob Gailer
Ivan Low wrote: > Bob Gailer wrote: > >> Ivan Low wrote: >> >>> Hi, I'm new to python trying to figure how to make this work. >>> >>> c=0;d=raw_input("input number limit: ") >>> >>> while 1: >>> c = c + 1 >>> if c == d: break >>> print c, >>> >>> >>> My idea is to able to input

Re: [Tutor] for loops over multiple lists of the same length

2006-06-22 Thread Shantanoo Mahajan
+++ Emily Fortuna [22-06-06 13:22 -0400]: | I feel like there should be a better way to do this process: | Can you please help? | (This is trivial example code I created off the top of my head, but the | same concept that I am trying to do elsewhere.) | | class Person(object): | def __init_

Re: [Tutor] Escape sequences

2006-06-22 Thread Kent Johnson
David Heiser wrote: > I have code that assigns escape sequences to variables like > "self.resetString = '\03'". As long as they are hard coded in, > everything works fine. > > But I want to read the variable from a text/config file so my users can > override the defaults. In the file are a list of

[Tutor] Escape sequences

2006-06-22 Thread David Heiser
I have code that assigns escape sequences to variables like "self.resetString = '\03'". As long as they are hard coded in, everything works fine. But I want to read the variable from a text/config file so my users can override the defaults. In the file are a list of "parameter = value" pairs like

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Orri Ganel
Ivan Low wrote: >Bob Gailer wrote: > > >>Ivan Low wrote: >> >> >>>Hi, I'm new to python trying to figure how to make this work. >>> >>>c=0;d=raw_input("input number limit: ") >>> >>>while 1: >>>c = c + 1 >>>if c == d: break >>>print c, >>> >>> >>>My idea is to able to input a num

[Tutor] [Fwd: Re: for loops over multiple lists of the same length]

2006-06-22 Thread Orri Ganel
Oops, forgot to reply to the list; sorry everyone. -- Email: singingxduck AT gmail DOT com AIM: singingxduck Programming Python for the fun of it. --- Begin Message --- Emily Fortuna wrote: Thanks, I knew there had to be a really simple way to do it. Emily Orri Ganel wrote: Emily Fortuna

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Ivan Low
Bob Gailer wrote: > Ivan Low wrote: >> Hi, I'm new to python trying to figure how to make this work. >> >> c=0;d=raw_input("input number limit: ") >> >> while 1: >> c = c + 1 >> if c == d: break >> print c, >> >> >> My idea is to able to input a number to limit the print out of this >>

Re: [Tutor] for loops over multiple lists of the same length

2006-06-22 Thread Kent Johnson
Emily Fortuna wrote: > I feel like there should be a better way to do this process: > Can you please help? > (This is trivial example code I created off the top of my head, but the > same concept that I am trying to do elsewhere.) > > class Person(object): > def __init__(self, first_name, a

[Tutor] for loops over multiple lists of the same length

2006-06-22 Thread Emily Fortuna
I feel like there should be a better way to do this process: Can you please help? (This is trivial example code I created off the top of my head, but the same concept that I am trying to do elsewhere.) class Person(object): def __init__(self, first_name, age, fav_color): s

Re: [Tutor] How to make the loop work?

2006-06-22 Thread doug shawhan
Hi Bob, You can use a while loop in this case, but range() might be a bit more appropriate! c = 0 d = raw_input("Enter Number Limit: ") for i in range(int(d)): #note, we make sure "d" is an integer!     c = c + 1     print cOn 6/22/06, Bob Gailer <[EMAIL PROTECTED]> wrote: Ivan Low wrote:> Hi, I

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Bob Gailer
Ivan Low wrote: > Hi, I'm new to python trying to figure how to make this work. > > c=0;d=raw_input("input number limit: ") > > while 1: > c = c + 1 > if c == d: break > print c, > > > My idea is to able to input a number to limit the print out of this loop. > But this will not work. Wh

[Tutor] Python Word Unscrambler

2006-06-22 Thread Null Mr.Freeman
Python Word Unscrambler: OK, this is the Python code I'm using to unscramble words but it unscrambles one word at a time, can someone please help me out and tell me how can I improve my code to make it decrypt several words at a time? P.S: Another thing is that it prints the solution 4 or 5 time

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Peter Jessop
It's basically correct but you need to convert the raw_input to integer. c=0 d=int(raw_input("input number limit: ")) while 1: c = c + 1 if c == d: break print c ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tu

[Tutor] How to make the loop work?

2006-06-22 Thread Ivan Low
Hi, I'm new to python trying to figure how to make this work. c=0;d=raw_input("input number limit: ") while 1: c = c + 1 if c == d: break print c, My idea is to able to input a number to limit the print out of this loop. But this will not work. Where is the error? Ivan

[Tutor] Question regarding commit/backout of a message using the pymqi module

2006-06-22 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, Could someone help explain what I am doing wrong in this code block? This code block is an excerpt from a larger file that receives transmitted files via IBM WebSphere MQSeries an drops it to the local file system. Transmission of the f

Re: [Tutor] help with GUI

2006-06-22 Thread Kent Johnson
Christopher Spears wrote: > My first problem is that the knob on the scrollbar > doesn't move when I drag it. I would like my GUI to > by wider as well. Finally, I need to figure out how > to get the number selected from the scrollbar to the > function that does the conversion. Just guessing fro