Re: [Tutor] Unable to run Programs on WINXP using Python3

2010-05-12 Thread Sivapathasuntha Aruliah
Hi I thank you for your prompt response. I am using WINXP. Possibly programs written for Python 3 may not work in Python2 as informed by you due to syntax unmatch. However when I try programs written for Python3 in Python3 it first comes out with a pop up message "C:\python31\python.exe is not

Re: [Tutor] (no subject)

2010-05-12 Thread Sivapathasuntha Aruliah
Regards, Siva Test Equipment Engineering Amkor Technology (S) Pte Ltd 1 Kaki Bukit View #03-28 TechView Building Singapore 415941 Tel: (65) 6347 1131 Fax: (65) 6746 4815 Luke Paireepinart 05/12/2010 01:35 PM To Dave Angel cc Sivapathasuntha Aruliah/S1/a...@amkor, "tutor@python.org" Subje

Re: [Tutor] Unable to run Programs on WINXP using Python3

2010-05-12 Thread Alan Gauld
"Sivapathasuntha Aruliah" wrote syntax unmatch. However when I try programs written for Python3 in Python3 it first comes out with a pop up message "C:\python31\python.exe is not a valid Win32 application" I'd concentrate on this first. If XP cant run Python all else is doomed to fail!

Re: [Tutor] Help required to count no of lines that are until 1000 characters

2010-05-12 Thread Alan Gauld
"Dave Angel" wrote But you have a serious bug in your code, that nobody in the first five responses has addressed. That while loop will loop over the first line repeatedly, till it reaches or exceeds 1000, regardless of the length of subsequent lines. Oooh, good catch, I completely miss

Re: [Tutor] (no subject)

2010-05-12 Thread Sivapathasuntha Aruliah
Regards, Siva Test Equipment Engineering Amkor Technology (S) Pte Ltd 1 Kaki Bukit View #03-28 TechView Building Singapore 415941 Tel: (65) 6347 1131 Fax: (65) 6746 4815 Luke Paireepinart 05/12/2010 02:27 PM To Sivapathasuntha Aruliah/S1/a...@amkor cc Dave Angel , "tutor@python.org" Subjec

Re: [Tutor] (no subject)

2010-05-12 Thread Sivapathasuntha Aruliah
Luke Paireepinart 05/12/2010 02:27 PM To Sivapathasuntha Aruliah/S1/a...@amkor cc Dave Angel , "tutor@python.org" Subject Re: [Tutor] (no subject) I'm just not going to quote previous threads because with my top-posting and dave's bottom-posting and whatever the heck Siva's posting w

Re: [Tutor] (no subject)

2010-05-12 Thread Alan Gauld
"Sivapathasuntha Aruliah" wrote Siva is it possible that you accidentally installed the 64-bit version of python 3.1? Luke I am not sure how to install 32 bit or 64 bit I cannot remember how I installed it. However I just checked and there are two downloads which are isted here. Is it the

Re: [Tutor] (no subject)

2010-05-12 Thread Luke Paireepinart
> > Siva is it possible that you accidentally installed the 64-bit version of > python 3.1? > Hi Luke > I checked again and found that Python Shell has the following which is win32 > > Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] > on win32 > Type "copyright", "cre

Re: [Tutor] Unable to run Programs on WINXP using Python3

2010-05-12 Thread Lie Ryan
On 05/12/10 13:31, Sivapathasuntha Aruliah wrote: > Hi > I thank you for your prompt response. I am using WINXP. Possibly programs > written for Python 3 may not work in Python2 as informed by you due to > syntax unmatch. Very unlikely. If python is told to execute a faulty script (or even arb

[Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Hi All, This is my first post and I want to set a plan for learning python syntax within 2 weeks. I'm C++/Qt desktop developer and I want to learn python for creating rapid web applications so I read some articles about that and I found that django is suitable framework -I guess- but I still

Re: [Tutor] (no subject)

2010-05-12 Thread Steven D'Aprano
On Wed, 12 May 2010 03:35:27 pm Luke Paireepinart wrote: > I'd have rather you top-posted, then I wouldn't have wasted 30 > seconds scrolling past a bunch of irrelevant crap that I just gloss > over anyway. > If I want context I'll read the previous messages in the thread. > but that's just MHO. T

Re: [Tutor] (no subject)

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 20:12:29 +1000 Steven D'Aprano wrote: > On Wed, 12 May 2010 03:35:27 pm Luke Paireepinart wrote: > > I'd have rather you top-posted, then I wouldn't have wasted 30 > > seconds scrolling past a bunch of irrelevant crap that I just gloss > > over anyway. > > If I want context I'

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 13:09:05 +0200 "M. Bashir Al-Noimi" wrote: > Hi All, > > This is my first post and I want to set a plan for learning python > syntax within 2 weeks. > > I'm C++/Qt desktop developer and I want to learn python for creating > rapid web applications so I read some articles ab

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Hi denis, On 12/05/2010 01:25 م, spir ☣ wrote: On Wed, 12 May 2010 13:09:05 +0200 "M. Bashir Al-Noimi" wrote: Hi All, This is my first post and I want to set a plan for learning python syntax within 2 weeks. I'm C++/Qt desktop developer and I want to learn python for creating rapid web

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread Dave Angel
M. Bashir Al-Noimi wrote: humm, you confused me I'm still a newbie and I don't know anything about differences between C++ & python even I couldn't understand you. How C++ is a static language !??!! In C++, every variable is declared, and the type of that variable is static over its

[Tutor] object structure

2010-05-12 Thread spir ☣
Hello, Python objects are supposed to be mainly a structure composed of a (pointer to a) type and a (pointer to a) value; and to be more or less implemented that way in the C version. When an object is of a standard type like a number, the value field would then point to a C value, or rather

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 15:01:09 +0200 "M. Bashir Al-Noimi" wrote: > humm, you confused me I'm still a newbie and I don't know anything about > differences between C++ & python even I couldn't understand you. How C++ > is a static language !??!! Have a look at: http://en.wikipedia.org/wiki/Dynamic

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Hi On 12/05/2010 02:25 م, Dave Angel wrote: M. Bashir Al-Noimi wrote: humm, you confused me I'm still a newbie and I don't know anything about differences between C++ & python even I couldn't understand you. How C++ is a static language !??!! In C++, every variable is declared, and the

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Hi On 12/05/2010 02:52 م, spir ☣ wrote: On Wed, 12 May 2010 15:01:09 +0200 "M. Bashir Al-Noimi" wrote: humm, you confused me I'm still a newbie and I don't know anything about differences between C++& python even I couldn't understand you. How C++ is a static language !??!! Have a

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 16:12:55 +0200 "M. Bashir Al-Noimi" wrote: > Hi > > On 12/05/2010 02:52 م, spir ☣ wrote: > > On Wed, 12 May 2010 15:01:09 +0200 > > "M. Bashir Al-Noimi" wrote: > > > > > >> humm, you confused me I'm still a newbie and I don't know anything about > >> differences between

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Thanks a lot Walter for valuable reply, On 12/05/2010 03:09 م, Walter Prins wrote: On 12 May 2010 12:09, M. Bashir Al-Noimi > wrote: 1. From where I can start python by examples for C++ developers (I don't want documentation tutorials cuz I need simple

[Tutor] Character creator program

2010-05-12 Thread Ben Millane
Ok first off here is a link to my code http://pastie.org/956909 My problem is, that although I have the program working how I want it to work in general. I still have an issue with the user input section. If my user inputs any of the options from the menu, the program works as it should. But s

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread Alan Gauld
"M. Bashir Al-Noimi" wrote This is my first post and I want to set a plan for learning python syntax within 2 weeks. Learning python syntax in 2 weeks is easily achievable if you go through the official tutorial at python.org. It is designed for people coming from another language, especi

Re: [Tutor] Character creator program

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 13:33:46 +0100 "Ben Millane" wrote: > Ok first off here is a link to my code > > http://pastie.org/956909 > > My problem is, that although I have the program working how I want it to work > in general. I still have an issue with the user input section. If my user > inputs

Re: [Tutor] Character creator program

2010-05-12 Thread Alan Gauld
"Ben Millane" wrote My problem is, that although I have the program working how I want it to work in general. I still have an issue with the user input section. If my user inputs any of the options from the menu, the program works as it should. But say if the user accidentally pressed enter

[Tutor] Turbo Gears 2 Training this Saturday in DC

2010-05-12 Thread Alex Clark
Hi Folks, For those of you not on the python-general list, and if live in the Washington, D.C. USA area, we (the Zope/Python Users Group of DC) are having a `Turbo Gears 2` training this weekend: http://www.meetup.com/python-meetup-dc/messages/10123013/ The following day there will be a sprint

[Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread Su Chu
Hi there, I am new to Python. I am attempting to either define a "which" statement or to find a method that already exists to do this sort of operation. My problem is as follows: I have three lists, one with unique values (list 1), one a sequence of values that are not necessarily unique (list2),

[Tutor] creating distribution lists in outlook

2010-05-12 Thread Pirritano, Matthew
Pythonistas, I'm trying to find a way to get data into outlook. Specifically to create distribution lists. I need to create a number of distribution lists on a regular basis. Each list is created from one long master list. I will step through the master list 50 lines at a time, save as separat

Re: [Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread bob gailer
On 5/12/2010 1:58 PM, Su Chu wrote: I have three lists, one with unique values (list 1), one a sequence of values that are not necessarily unique (list2), and a shorter list with the unique values of list 2 (list 3). List 1 and List 2 are of equal lengths. An example: list1 = [ 1, 2, 3, 4,

Re: [Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread Dave Angel
Su Chu wrote: Hi there, I am new to Python. I am attempting to either define a "which" statement or to find a method that already exists to do this sort of operation. My problem is as follows: I have three lists, one with unique values (list 1), one a sequence of values that are not necessarily

Re: [Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread Lie Ryan
On 05/13/10 03:58, Su Chu wrote: > Hi there, > > I am new to Python. I am attempting to either define a "which" statement or > to find a method that already exists to do this sort of operation. > > My problem is as follows: > I have three lists, one with unique values (list 1), one a sequence of

[Tutor] raw_input a directory path

2010-05-12 Thread Spencer Parker
I have a search and replace script that I am having the user put in the directory path as raw_input. The problem lies when I run the script it doesn't pick that up for some reason. Is there an appropriate way to take a directory path as input? This is on windows... ___

Re: [Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread Luke Paireepinart
On Wed, May 12, 2010 at 1:22 PM, bob gailer wrote: > On 5/12/2010 1:58 PM, Su Chu wrote: >> >> I have three lists, one with unique values (list 1), one a sequence of >> values that are not necessarily unique (list2), and a shorter list with the >> unique values of list 2 (list 3). List 1 and List

Re: [Tutor] raw_input a directory path

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 13:44:30 -0600 Spencer Parker wrote: > I have a search and replace script that I am having the user put in the > directory path as raw_input. The problem lies when I run the script it > doesn't pick that up for some reason. Is there an appropriate way to take a > directory p

Re: [Tutor] raw_input a directory path

2010-05-12 Thread Luke Paireepinart
On Wed, May 12, 2010 at 2:44 PM, Spencer Parker wrote: > I have a search and replace script that I am having the user put in the > directory path as raw_input.  The problem lies when I run the script it > doesn't pick that up for some reason.  Is there an appropriate way to take a > directory path

Re: [Tutor] object structure

2010-05-12 Thread Eike Welk
Hello Denis! On Wednesday May 12 2010 14:37:54 spir ☣ wrote: > class Integer(int): pass > i = Integer(1) > i.name = "one" > print i,i.name# --> "1 one" > > An instance of Integer has both a value 1 and a dict. Actually, one can do > more sophisticated things (below __new__ is needed bec

[Tutor] Fwd: raw_input a directory path

2010-05-12 Thread Spencer Parker
Spreading it to the list... -- Forwarded message -- From: Spencer Parker Date: Wed, May 12, 2010 at 3:07 PM Subject: Re: [Tutor] raw_input a directory path To: Luke Paireepinart Forget all of what I said...I found the problem...I was encasing the variable with quotes instead of

Re: [Tutor] raw_input a directory path

2010-05-12 Thread Spencer Parker
Here is the code: http://dpaste.com/hold/193862/ It still isn't working for me. I don't see it hitting the first for loop or even the second one. It runs without an error at all. I am inputing the directory as: \\Documents\ and\ Settings\\user\\Desktop\\test On

[Tutor] raw_input a directory path

2010-05-12 Thread Spencer Parker
I have a search and replace script that I am having the user put in the directory path as raw_input. The problem lies when I run the script it doesn't pick that up for some reason. Is there an appropriate way to take a directory path as input? ___ Tutor

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread ALAN GAULD
Forwarded to the list. Please use Reply All when posting. From: Walter Prins To: Alan Gauld Sent: Wednesday, 12 May, 2010 18:36:31 Subject: Re: [Tutor] First steps for C++/Qt developers Regarding IDE's: I find Eclipse with PyDev pretty good, and it recently gained support for Django specific

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Alan Gauld
"Pirritano, Matthew" wrote I've found ways to get contact and lists out of outlook but none on how to get stuff in. Is there a manual to address such python functions? Is it part of win32? You can use COM to communicate with Outlook via win32com. However the COM interface to Outlook was fair

Re: [Tutor] raw_input a directory path

2010-05-12 Thread Alan Gauld
"Spencer Parker" wrote Here is the code: http://dpaste.com/hold/193862/ First comment: why are you using print followed by raw_input? You could put the prompt string inside raw_input - if you need a new line just put a \n in the prompt string. It will shorten and clarify the code.

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Luke Paireepinart
On Wed, May 12, 2010 at 12:44 PM, Pirritano, Matthew wrote: > Pythonistas, > > I’m trying to find a way to get data into outlook. Specifically to create > distribution lists. Have you considered looking into Outlook's Import feature for address books? It may be possible to import data from csv's

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Pirritano, Matthew
That's the way we've been doing it. The issue, and inspiration for pythonification is that the list has 1000+ emails. Outlook only allows about 50 per list, which leads to the need to create 20+ separate lists, which takes a considerable amount of time. Matthew Pirritano, Ph.D. Research Analyst I

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Luke Paireepinart
On Wed, May 12, 2010 at 6:20 PM, Pirritano, Matthew wrote: > That's the way we've been doing it. The issue, and inspiration for > pythonification is that the list has 1000+ emails. Outlook only allows > about 50 per list, which leads to the need to create 20+ separate lists, > which takes a consid

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Pirritano, Matthew
Here's the thing. You can import them all at once. But then you have 1000+ contacts in one contacts folder. When you create the distribution lists a number get cut off if you try to put too many into the list. But there is no indication of how many went into the list. And there are not row numbers

Re: [Tutor] creating distribution lists in outlook

2010-05-12 Thread Luke Paireepinart
On Wed, May 12, 2010 at 6:32 PM, Pirritano, Matthew wrote: > Here's the thing. You can import them all at once. But then you have > 1000+ contacts in one contacts folder. When you create the distribution > lists a number get cut off if you try to put too many into the list. But > there is no indic

Re: [Tutor] Find Elements in List That Equal A Specific Value

2010-05-12 Thread Steven D'Aprano
On Thu, 13 May 2010 03:58:45 am Su Chu wrote: > My problem is as follows: > I have three lists, one with unique values (list 1), one a sequence > of values that are not necessarily unique (list2), and a shorter list > with the unique values of list 2 (list 3). List 1 and List 2 are of > equal leng

Re: [Tutor] raw_input a directory path

2010-05-12 Thread Dave Angel
Spencer Parker wrote: Here is the code: http://dpaste.com/hold/193862/ It still isn't working for me. I don't see it hitting the first for loop or even the second one. It runs without an error at all. I am inputing the directory as: \\Documents\ and\ Settings

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Thanks Alan, On 12/05/2010 06:56 م, Alan Gauld wrote: "M. Bashir Al-Noimi" wrote This is my first post and I want to set a plan for learning python syntax within 2 weeks. Learning python syntax in 2 weeks is easily achievable if you go through the official tutorial at python.org. It is des

Re: [Tutor] First steps for C++/Qt developers

2010-05-12 Thread M. Bashir Al-Noimi
Hi Walter, On 13/05/2010 12:45 ص, ALAN GAULD wrote: Forwarded to the list. Please use Reply All when posting. *From:* Walter Prins *To:* Alan Gauld *Sent:* Wednesday, 12 May, 2010 18:36:31 *Subject:* Re: [Tutor] First steps for C++/Qt developers Regarding IDE's: I find Eclipse with PyDev pret