[Tutor] Running python from windows command prompt

Amit Saha amitsaha.in at gmail.com
Wed Apr 10 14:43:18 CEST 2013


On Wed, Apr 10, 2013 at 10:32 PM, Arijit Ukil <arijit.ukil at tcs.com> wrote:
> I like to run a python program "my_python.py" from windows command prompt.
> This program ( a function called testing) takes input as block data (say
> data = [1,2,3,4] and outputs processed single data.
>
> import math
>
> def avrg(data):
>    return sum(data)/len(data)
>
> def testing (data):
>    val = avrg(data)
>    out = pow(val,2)
>    return out
>
> I am using python 2.6. My intention is to run from windows command prompt as
>
> python my_python.py 1 3  2

I am hoping this is not your complete program. What tutorial are you
following? Can you please paste complete programs?

-Amit.

--
http://amitsaha.github.com/


More information about the Tutor mailing list