Re: [Tutor] [Pythonmac-SIG] GASP on OSX 10.5.6

2009-06-29 Thread Chris Rebert
On Mon, Jun 29, 2009 at 3:59 PM, Daniel Satosato.ph...@gmail.com wrote:
 Hi,

 I am a complete python beginner.  I have been going through How to Think
 Like A Computer Scientist 2nd edition online and have come across installing
 GASP in chapter 4.  Unfortunately, I can't seem to find much documentation
 on how to install GASP when running OSX and Python 2.6.2.  Any help would be
 greatly appreciated.

Mac OS X apparently not a supported platform:
https://answers.launchpad.net/gasp-code/+faq/42

Cheers,
Chris
-- 
http://blog.rebertia.com
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Accessing callers context from callee method

2009-02-24 Thread Chris Rebert
On Tue, Feb 24, 2009 at 10:53 AM,  mobiledream...@gmail.com wrote:
 when i call a method foo from another method func. can i access func context
 variables or locals() from foo
 so
 def func():
   i=10
   foo()

 in foo, can i access func's local variables on in this case i

You can, but it's an evil hack that I would avoid if at all possible;
there are almost certainly better ways to accomplish whatever your
goal is.

Cheers,
Chris

-- 
Follow the path of the Iguana...
http://rebertia.com
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Where's Psyco now?

2009-01-09 Thread Chris Rebert
On Fri, Jan 9, 2009 at 10:41 AM, Vicent vgi...@gmail.com wrote:
 Hello. This is my first message to the list.

 In this article written in 2002

 http://www.ibm.com/developerworks/library/l-psyco.html

 they talk about Psyco as a module that makes it possible to accelerate
 Python.

 Is it still a state-of-the-art module?

 I found it here also: http://pypi.python.org/pypi/psyco/1.6

 Do you think it's useful, or it depends...?

Its present homepage is http://psyco.sourceforge.net/ , and yes, it is
still useful and fairly current.
However, it should be used judiciously; only bother with it if you're
having a performance problem and would otherwise be tempted to rewrite
the algorithm in C. Don't casually use it as an all-purpose
accelerator, as that's not what it was built for.

Cheers,
Chris

-- 
Follow the path of the Iguana...
http://rebertia.com
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor