Re: [Tutor] is gotchas?

2006-11-07 Thread wesley chun
> > a is b <==> id(a) == id(b) > > No, not necessarily. id's are recycled which can lead to unexpected > behaviour when comparing them. See for example this thread on c.l.py: > http://tinyurl.com/yflknx wow, that is totally mind-blowing.. good post. i think that for most normal objects that are *n

Re: [Tutor] hardware specs from python on OSX

2006-11-07 Thread Danny Yoo
On Tue, 7 Nov 2006, Yi Qiang wrote: > I am trying to get some basic information about the computer's hardware > specs in OSX in python. In linux I can get most of what I need from the > /proc filesystem. Is there an equivalent in OSX? If not, where else > can I get information about the sy

[Tutor] hardware specs from python on OSX

2006-11-07 Thread Yi Qiang
Hi, I am trying to get some basic information about the computer's hardware specs in OSX in python. In linux I can get most of what I need from the /proc filesystem. Is there an equivalent in OSX? If not, where else can I get information about the system from? I need CPU model, # of cpus, cpu s

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread John Fouhy
On 08/11/06, Carroll, Barry <[EMAIL PROTECTED]> wrote: > Correct indeed. But lambda functions ARE anonymous. > > "Python supports the creation of anonymous functions (i.e. > functions that are not bound to a name) at runtime, using > a construct called "lambda". >

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Carroll, Barry
Hello again. > -Original Message- > Date: Tue, 7 Nov 2006 09:56:42 - > From: "Alan Gauld" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Ruby Code Blocks vs. Python Lambdas > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; format=flowed; charset="iso-8859

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Carroll, Barry
> -Original Message- > Date: Tue, 07 Nov 2006 12:20:16 +0100 > From: Andreas Kostyrka <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Ruby Code Blocks vs. Python Lambdas > To: Alan Gauld <[EMAIL PROTECTED]> > Cc: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; char

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Tim Johnson
* Alan Gauld <[EMAIL PROTECTED]> [061107 08:27]: > Apropos of nothing at all... > > "Kent Johnson" <[EMAIL PROTECTED]> wrote > > Carroll, Barry wrote: > >> ... consensus was that Python was much better than Ruby > > > > Sounds like you had a table full of Pythonistas. > > And Andreas, Danny a

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Andreas Kostyrka
Am Dienstag, den 07.11.2006, 17:22 + schrieb Alan Gauld: > Apropos of nothing at all... > > "Kent Johnson" <[EMAIL PROTECTED]> wrote > > Carroll, Barry wrote: > >> ... consensus was that Python was much better than Ruby > > > > Sounds like you had a table full of Pythonistas. > > And Andr

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Alan Gauld
Apropos of nothing at all... "Kent Johnson" <[EMAIL PROTECTED]> wrote > Carroll, Barry wrote: >> ... consensus was that Python was much better than Ruby > > Sounds like you had a table full of Pythonistas. And Andreas, Danny and I also argued for Ruby. And elsewhere Tim making a case for Rebo

[Tutor] comparing languages [was (OT) Flame wars]

2006-11-07 Thread Tim Johnson
* Alan Gauld <[EMAIL PROTECTED]> [061107 01:02]: > > "Tim Johnson" <[EMAIL PROTECTED]> wrote > >> allows us to embed loops and all sorts, effectively adding new > >> command structures to the language in a way that only Lisp > >> and Tcl have really been good at up till now. > > > > Sorry Alan,

Re: [Tutor] First real script

2006-11-07 Thread Luke Paireepinart
Carlos wrote: > Hello to all, > > Ok, after reading your comments I ended up with this: > > #Easy_2DCA_01.py > #A very basic 2D script that lets you play with Wolfram's rule 30 > > A_List = [0]*10+[1]+[0]*10 > A_Len = len(A_List) > B_List = [] > print A_List > Iterations = 5 > > rule_30 = { >

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread johnf
On Tuesday 07 November 2006 03:20, Andreas Kostyrka wrote: > That's bullshit. Python and Ruby are quite comparable Gee Andreas tell us how you really feel! BTW I agree that Python and Ruby are very close. John ___ Tutor maillist - Tutor@python.org h

[Tutor] Help me with installing Soappymodule

2006-11-07 Thread Asrarahmed Kadri
Hi Folks,   I want to install SOAPpy module. As stated on http://pywebsvcs.sourceforge.net/soappy.txt, there are two modules that should be installed prior to installing SOAPpy. One in pyXML and the other is fpconst. I installed pyXML from the URL stated on teh above website. But the URL for fpcon

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Andreas Kostyrka
Am Dienstag, den 07.11.2006, 09:56 + schrieb Alan Gauld: > "Carroll, Barry" <[EMAIL PROTECTED]> wrote > > > Thank you for this post. I was in a discussion of Ruby vs. Python > > at > > lunch today. The consensus was that Python was much better than > > Ruby in > > all ways. That's bullshi

Re: [Tutor] is gotchas?

2006-11-07 Thread Kent Johnson
wesley chun wrote: >> 3)is there a special method for `is'. > > no, not really. you can use id() and '==' to proxy for is: > > a is b <==> id(a) == id(b) No, not necessarily. id's are recycled which can lead to unexpected behaviour when comparing them. See for example this thread on c.l.py: htt

Re: [Tutor] First real script

2006-11-07 Thread Alan Gauld
"Carlos" <[EMAIL PROTECTED]> wrote > As you may have noticed the name of the script has changed, I will > now > try a 3D CA. I have been thinking that the best way to do this would > be > to use a matrix, like those found in SciPy. Do you think this is a > good > idea? Using a matrix is fine

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Kent Johnson
Carroll, Barry wrote: > Thank you for this post. I was in a discussion of Ruby vs. Python at > lunch today. The consensus was that Python was much better than Ruby in > all ways. Since I know very little about Ruby, I had nothing to add to > the conversation. Sounds like you had a table full

Re: [Tutor] Please help to debug this function..

2006-11-07 Thread ALAN GAULD
Reposting to the list. --- Asrarahmed Kadri <[EMAIL PROTECTED]> wrote: > > >except ValueError: > > >flag = False > > >startdate = None > > >enddate = None > > >err_msg = traceback.format_exc() > > >index =

Re: [Tutor] First real script

2006-11-07 Thread Carlos
Hello to all, Ok, after reading your comments I ended up with this: #Easy_2DCA_01.py #A very basic 2D script that lets you play with Wolfram's rule 30 A_List = [0]*10+[1]+[0]*10 A_Len = len(A_List) B_List = [] print A_List Iterations = 5 rule_30 = { (1, 1, 1) : 0, (1, 1, 0) : 0,

Re: [Tutor] How to set PYTHONPATH

2006-11-07 Thread Alan Gauld
"Eli Brosh" <[EMAIL PROTECTED]> wrote > How do i set the PYTHONPATH variable ? > How is it done under Windows XP ? Go to MyComputer and right click, select Properties Go to the Advanced Tab Click the EnvironmentVariables button In the lower window, labelled System Variables look for PYTHONPA

Re: [Tutor] Ruby Code Blocks vs. Python Lambdas

2006-11-07 Thread Alan Gauld
"Carroll, Barry" <[EMAIL PROTECTED]> wrote > Thank you for this post. I was in a discussion of Ruby vs. Python > at > lunch today. The consensus was that Python was much better than > Ruby in > all ways. That's a little hard on Ruby. There are many good features and several of them are arguab

Re: [Tutor] (OT) Flame wars

2006-11-07 Thread Alan Gauld
"Tim Johnson" <[EMAIL PROTECTED]> wrote >> allows us to embed loops and all sorts, effectively adding new >> command structures to the language in a way that only Lisp >> and Tcl have really been good at up till now. > > Sorry Alan, but you are leaving out rebol. Command structures > in rebol

Re: [Tutor] a line

2006-11-07 Thread Alan Gauld
Linda, >- Original Message - > From: "linda.s" <[EMAIL PROTECTED]> > To: "Danny Yoo" <[EMAIL PROTECTED]> > Cc: "Alan Gauld" <[EMAIL PROTECTED]>; "Tutor" > > Sent: Tuesday, November 07, 2006 12:00 AM > Subject: a line I can't speak for Danny, but I'd apprreciate if you could just post y