Hi All,
Apologies in advance, this question is very rudimentary, but I can't seem to get it right.
I am running python within cygwin. I have a python script called test.py, and inside it a function defined simply as
def square(x):
return x*x
print "hello world"
My question is how do I run this script/call the function inside it?
python test.py does not do anything, I read that something like this might work:
python test.py "square(2)"
but this does not work either. Please help! Thank you in advance.
Apologies in advance, this question is very rudimentary, but I can't seem to get it right.
I am running python within cygwin. I have a python script called test.py, and inside it a function defined simply as
def square(x):
return x*x
print "hello world"
My question is how do I run this script/call the function inside it?
python test.py does not do anything, I read that something like this might work:
python test.py "square(2)"
but this does not work either. Please help! Thank you in advance.
Comment