Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'subject:Python': 0.06; 'variables': 0.07; 'arguments': 0.09; 'plug': 0.09; 'subject:script': 0.09; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'indexerror:': 0.16; 'index': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'script.': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'skip:" 30': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'file': 0.32; 'run': 0.32; 'quite': 0.32; '(most': 0.33; 'received:google.com': 0.35; 'subject:?': 0.36; 'subject:New': 0.37; 'list': 0.37; 'work?': 0.38; 'pm,': 0.38; 'recent': 0.39; 'sure': 0.39; 'how': 0.40; 'numbers': 0.61; 'range': 0.61; 'skip:n 10': 0.64; 'subject:get': 0.81; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=JF4807TpL1IWXvYZmyq8Ypfv0pi+hBL4LdXZII30w4E=; b=p5xEBF/IXl2mQVotxr4ZW7c0zD2Q4hs6KQzA2N3wxCSFqg935WEcQMmUaJqtEk3iF1 nbpQrMR2szwo3jMiqIBpuIbamI5nE6wFYzaCsRUPgyXcPdJGneN9hJxffnlHe0nN9oX7 QON55FvYcrvxIDC5U6Jio9Jk4IDnrJkjg7U/F+5Iq4ta/xTEXY4xIFluSYoqo3uD3tRA xFKEwRJp5uPhrqTldyMOc+27g7sETY0WoNQGDR4eP2pxPLOySAjHnNSpwZmBiJmfeb7k Y58Qkj9YA5Q9N35T/8jR41Sg0SW+Wv38XxRF4GqxWllhsicNGjSeGGu9/hsQprypf+lr ZTGw== MIME-Version: 1.0 X-Received: by 10.66.160.2 with SMTP id xg2mr18378868pab.23.1387179834899; Sun, 15 Dec 2013 23:43:54 -0800 (PST) In-Reply-To: References: <61009939-dc9b-4ffe-84c0-a695b96d9a2d@googlegroups.com> <5769f8c3-f09c-458a-92b6-c727bfe95656@googlegroups.com> <52ae596b$0$29976$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 16 Dec 2013 18:43:54 +1100 Subject: Re: New to Python, Help to get script working? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387179844 news.xs4all.nl 2904 [2001:888:2000:d::a6]:34495 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62015 On Mon, Dec 16, 2013 at 6:09 PM, Mark wrote: > Traceback (most recent call last): > File "C:\Python27\Scripts\Twitch.py", line 9, in > 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