Re: tutorial example

2005-11-12 Thread Ruben Charles
On 11/12/05, Max Erickson <[EMAIL PROTECTED]> wrote: > > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > > > In python a method is callable attached to an object. A function is a > callable object constructed with a def state

Re: tutorial example

2005-11-12 Thread Ruben Charles
That is the diference between a method and a function. A method do something and a function return something. Example: def psum(n, m): print (n + m) def rsum(n, m): return (n +m) Then try this... >>> psum(2, 3) >>> a = psum(2, 3) >>> a >>> a = rsum(2, 3) >>> a You see it? -- ht

Re: testing C code with python

2005-11-11 Thread Ruben Charles
On 11/10/05, Peter Hansen <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > A simple question - Is it common/good practice to test C code using > > Python? For example one could wrap individual C functions, and test > > each of them using python, maybe not for low-level things but at least

Re: Need Python Pro for Help!! Plzz

2005-11-01 Thread Ruben Charles
> On the other hand, a group for learning that has no experts in it may > tend to produce "what works" style of programming as oppsoed to "what is > a good idea or practise". What is better? Good practise doesn't work better? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Ruben Charles
A stranger from the land of Woot came to Master Foo as he was eating the morning meal with his students. "I hear y00 are very l33t," he said. "Pl33z teach m3 all y00 know." Master Foo's students looked at each other, confused by the stranger's barbarous language. Master Foo just smiled and replie

[wxPython-users] Web based applications are possible with wxPython?

2005-10-18 Thread Ruben Charles
Hi, I am reading some essays --http://www.paulgraham.com/avg.html "Beating the averages"-- and i am very interested in the web-based applications. I want to take the advantages having the application on a server. Is easy to update, maintain, etc... My questions is Can i have a wxPython GUI app

[OT]Scipy plotting problems

2005-09-19 Thread Ruben Charles
Hi, I'm using Scipy on Debian Gnu/Linux. (python2.3-scipy) in a program that have to show plots but while i'm testing capabilities of the three possible options (gplt, plt an xplt) a couple of questions comes up.

Re: Launching Python programs from Linux shell script

2005-09-09 Thread Ruben Charles
Yes... - Or... Add this line in de source: #!/usr/bin/env python then chmod +x myscript.py ./myscript.py On 9 Sep 2005 08:31:27 -0700, Ernesto <[EMAIL PROTECTED]> wrote: > Does anyone know how to start Python program(s) from a Linux shell > script