User Profile

Collapse

Profile Sidebar

Collapse
jackinoob
jackinoob
Last Activity: Mar 9 '08, 07:42 PM
Joined: Mar 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jackinoob
    replied to Noob needs help on very simple question
    Thanks,

    So when I make the function call from within the script, it works fine. But I can't seem to use the command line to accomplish this. How can one send parameters to a python function in test.py from the command line?
    I am using cygwin so I'm wondering if it's because of that.

    I have tried every combination:

    python test.py square(3) produces the error:

    bash: syntax error...
    See more | Go to post

    Leave a comment:


  • jackinoob
    replied to passing argument to python exexutable
    askalottaqs:

    I am having the exact same problem currently. Please let me know if you've found a solution.

    Thanks,
    See more | Go to post

    Leave a comment:


  • jackinoob
    started a topic Noob needs help on very simple question

    Noob needs help on very simple question

    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...
    See more | Go to post
No activity results to display
Show More
Working...