Do I Need This?

2006-04-08 Thread sdavies6
I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs, Scripts, and, td. I am not a programmer, so I'm wondering if I can

Re: Do I Need This?

2006-04-08 Thread Paul Boddie
sdavies6 wrote: I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs, Scripts, and, td. I am not a programmer, so I'm

Re: Do I Need This?

2006-04-08 Thread Terry Reedy
sdavies6 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs,

Re: Do I Need This?

2006-04-08 Thread Stephen Prinster
Terry Reedy wrote: There may be a page at python.com that explains more. I think you meant python.org. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do I Need This?

2006-04-08 Thread sdavies6
Paul Boddie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] sdavies6 wrote: I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders

Do I need to convert string to integer in python?

2006-02-26 Thread Allerdyce . John
Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? In my python script, I have this line: x /= 10; when i run it, I get this error: TypeError: unsupported operand type(s) for /=: 'unicode' and 'int' I want to divide x by 10 and assign that value

Re: Do I need to convert string to integer in python?

2006-02-26 Thread Heiko Wundram
[EMAIL PROTECTED] wrote: Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? Yes. Dynamic typing doesn't say anything about a string and a number being equal, as they are (e.g.) in Perl, it just says that you don't have to care what type of object

Re: Do I need to convert string to integer in python?

2006-02-26 Thread Alex Martelli
[EMAIL PROTECTED] wrote: Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? Nope, no such implicit conversion (thanks be!). Strings are strings and ints and ints and never the twain shall meet, except by explicit request;-). In my python script

Re: Do I need to convert string to integer in python?

2006-02-26 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? In my python script, I have this line: x /= 10; when i run it, I get this error: TypeError: unsupported operand type(s) for /=: 'unicode' and 'int' I want

Re: Do I need to convert string to integer in python?

2006-02-26 Thread Michael Amrhein
[EMAIL PROTECTED] schrieb: Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? In my python script, I have this line: x /= 10; when i run it, I get this error: TypeError: unsupported operand type(s) for /=: 'unicode' and 'int' I want

Re: Do I need to convert string to integer in python?

2006-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2006 11:55:54 -0800, Allerdyce.John wrote: Do I need to convert string to integer in python? or it will do it for me (since dynamic type)? In my python script, I have this line: x /= 10; when i run it, I get this error: TypeError: unsupported operand type(s

Re: Do I need to have site.py available or not ?

2005-08-06 Thread Thomas Heller
Reinhold Birkenfeld [EMAIL PROTECTED] writes: Terry Reedy wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, on startup my embedded python comes up with import site failed use -v. Later python crashes on Pyrun_file(). This is the first time I have used python and I would

Do I need to have site.py available or not ?

2005-08-05 Thread marcus . obrien
Hi, on startup my embedded python comes up with import site failed use -v. Later python crashes on Pyrun_file(). This is the first time I have used python and I would like to know does it require site.py to be read in, and has anyone got an idea how to pass in the -v without using the python -v

Re: Do I need to have site.py available or not ?

2005-08-05 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, on startup my embedded python comes up with import site failed use -v. Later python crashes on Pyrun_file(). This is the first time I have used python and I would like to know does it require site.py to be read in, and has anyone

Re: Do I need to have site.py available or not ?

2005-08-05 Thread Reinhold Birkenfeld
Terry Reedy wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, on startup my embedded python comes up with import site failed use -v. Later python crashes on Pyrun_file(). This is the first time I have used python and I would like to know does it require site.py to be

passing arguments to a function - do I need type ?

2005-07-10 Thread Philipp H. Mohr
Hello, I got a newbie question, I have written the following distance function: def distance(self,element1, element2): dist = 0 for n in range(len(element1)): dist = dist + pow((element1[n] - element2[n]),2) print 'dist' + dist return sqrt(dist) and

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread Jorgen Grahn
(You posted your question as a followup to oen of Xah Lee's musings. That is not the best of ideas, since people with threaded newsreaders tend not to see it. Just post (creating a new thread) next time.) On Sun, 10 Jul 2005 11:19:31 +0100 (BST), Philipp H. Mohr [EMAIL PROTECTED] wrote: Hello,

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread George Sakkis
Philipp H. Mohr [EMAIL PROTECTED] wrote: Hello, I got a newbie question, I have written the following distance function: def distance(self,element1, element2): dist = 0 for n in range(len(element1)): dist = dist + pow((element1[n] - element2[n]),2)

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread Steven D'Aprano
On Sun, 10 Jul 2005 11:19:31 +0100, Philipp H. Mohr wrote: Hello, I got a newbie question, I have written the following distance function: Great. Now, how about you tell us what you expect it to do? I assume it calculates the Euclidean distance between two points. (If you don't know what

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread Paul McGuire
Is getCenter a function? If so, you need to invoke distance using: dist = self.distance( n.getCenter(), newElement ) Of course, that is assuming that newElement is a local variable of type list/tuple/etc. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments to a function - do I need type ?

2005-07-10 Thread Philipp H. Mohr
Hello, thank you very much for all your help. I have solved the problem - you guys where right, the problem was some where else. I have another class which got an accessor: def getCenter(self): global center return center and I called it by saying n.getCenter, but this

Re: Do I need a nested lambda to do this?

2005-04-26 Thread Kent Johnson
raoul wrote: I can't figure this one out. Trying to be unnecessarily functional I suspect. I have the following lists. vals = [1.000,2.344,4.2342] tab = [((0,1),(0,3),(0,4)), ((2,2),(3,0),(3,9)), ((3,4),(6,3),(7,1))] I'm trying to create a one liner using map/reduce/lambda/zip(* etc

Re: Do I need a nested lambda to do this?

2005-04-26 Thread raoul
very nice bill. thanks all. -- http://mail.python.org/mailman/listinfo/python-list

Do I need a nested lambda to do this?

2005-04-25 Thread raoul
I can't figure this one out. Trying to be unnecessarily functional I suspect. I have the following lists. vals = [1.000,2.344,4.2342] tab = [((0,1),(0,3),(0,4)), ((2,2),(3,0),(3,9)), ((3,4),(6,3),(7,1))] I'm trying to create a one liner using map/reduce/lambda/zip(* etc to do

Re: Do I need a nested lambda to do this?

2005-04-25 Thread R. C. James Harlow
On Tuesday 26 April 2005 00:34, raoul wrote: I can't figure this one out. Trying to be unnecessarily functional I suspect. With list comprehensions: Python 2.3.4 (#1, Mar 26 2005, 20:54:10) [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2 Type help, copyright,

Re: Do I need a nested lambda to do this?

2005-04-25 Thread Bill Mill
On 4/25/05, R. C. James Harlow [EMAIL PROTECTED] wrote: On Tuesday 26 April 2005 00:34, raoul wrote: I can't figure this one out. Trying to be unnecessarily functional I suspect. With list comprehensions: Python 2.3.4 (#1, Mar 26 2005, 20:54:10) [GCC 3.3.4 20040623 (Gentoo Linux

<    1   2   3