Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62015

Re: New to Python, Help to get script working?

References (1 earlier) <5769f8c3-f09c-458a-92b6-c727bfe95656@googlegroups.com> <bd321ee0-3966-4eb6-8fff-3b32e6848a86@googlegroups.com> <52ae596b$0$29976$c3e8da3$5496439d@news.astraweb.com> <mailman.4163.1387161201.18130.python-list@python.org> <fe57dbb8-f8be-4787-a6d6-e7c723b47670@googlegroups.com>
Date 2013-12-16 18:43 +1100
Subject Re: New to Python, Help to get script working?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4184.1387179844.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Dec 16, 2013 at 6:09 PM, Mark <markyshizzle@gmail.com> wrote:
> Traceback (most recent call last):
>   File "C:\Python27\Scripts\Twitch.py", line 9, in <module>
>     numberOfViewers = int(sys.argv[1])
> IndexError: list index out of range
>
> Is this where i would plug in the variables to make it work? I'm not quite sure about how you would plug in those numbers

In Python, sys.argv is the arguments passed to the script. You need to
pass it some arguments when you run it.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-14 20:51 -0800
  Re: New to Python, Help to get script working? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-15 05:03 +0000
  Re: New to Python, Help to get script working? Chris Angelico <rosuav@gmail.com> - 2013-12-15 16:06 +1100
  Re: New to Python, Help to get script working? Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-15 15:25 +0000
  Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 13:19 -0800
    Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 13:31 -0800
      Re: New to Python, Help to get script working? Chris Angelico <rosuav@gmail.com> - 2013-12-16 09:10 +1100
      Re: New to Python, Help to get script working? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-16 01:37 +0000
        Re: New to Python, Help to get script working? Chris Angelico <rosuav@gmail.com> - 2013-12-16 13:33 +1100
          Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 23:09 -0800
            Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 23:43 -0800
              Re: New to Python, Help to get script working? Chris Angelico <rosuav@gmail.com> - 2013-12-16 18:47 +1100
              Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 23:48 -0800
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 23:52 -0800
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-15 23:55 -0800
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-16 00:02 -0800
                Re: New to Python, Help to get script working? "Frank Millman" <frank@chagford.com> - 2013-12-16 10:38 +0200
                Re: New to Python, Help to get script working? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-16 09:28 +0000
                Re: New to Python, Help to get script working? Ned Batchelder <ned@nedbatchelder.com> - 2013-12-16 10:19 -0500
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-16 12:25 -0800
                Re: New to Python, Help to get script working? rusi <rustompmody@gmail.com> - 2013-12-16 17:05 -0800
                Re: New to Python, Help to get script working? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-16 21:05 -0500
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-17 03:05 -0800
                Re: New to Python, Help to get script working? rusi <rustompmody@gmail.com> - 2013-12-17 09:13 -0800
            Re: New to Python, Help to get script working? Chris Angelico <rosuav@gmail.com> - 2013-12-16 18:43 +1100
            Re: New to Python, Help to get script working? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-12-17 09:33 -0800
              Re: New to Python, Help to get script working? Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-17 12:40 -0500
                Re: New to Python, Help to get script working? Mark <markyshizzle@gmail.com> - 2013-12-18 14:46 -0800

csiph-web