Search the Community

Showing results for tags 'argv'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • General
    • Show Us Your Creations
    • Blog
    • Recommended Reading
  • One Stop Programming Tutorials
    • Python Beginner Series
  • Programming Languages
    • Python
    • C++
    • C#
    • Arduino
    • Other Languages

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. Hey guys! Brand new to the site, and I'm just curious about one thing, I've been learning python for awhile now, and although so far ospPython has been working wonderfully, i've encountered an error that i'm not sure how to tackle. It seems that whenever I try to utilize argv, it just doesn't work. The reason I'm coming here with this problem is not only because i'm pretty sure this was the birthplace of ospPython, but it seems like a great, helpful community. so if anyone could offer advice, and even just tell me if i'm simply entering it wrong, i'd greatly appreciate it. My simple program, taken from "Learn Python the Hard Way", exercise 14, will be posted below, along with how I enter it into the command line; from sys import argv script, user_name = argv prompt = '> ' print "Hi %s, I'm the %s script." % (user_name, script) print "I'd like to ask a few questions, if that's alright with you." print "Do you like me %s?" % user_name likes = raw_input(prompt) print "Where do you live %s?" % user_name lives = raw_input(prompt) print "What kind of computer do you have?" computer = raw_input(prompt) print """ alright, so you said %r about liking me. you live in %r. Not sure where that is. and you have a %r computer. Nice. """ % (likes, lives, computer) ---------------------------------------------------------- PS C:\Users\Brennan\desktop\".py files"\PTHW> ospPython <any script name> <any name> thanks again!