New to Python, Help to get script working?

Mark markyshizzle at gmail.com
Mon Dec 16 02:48:56 EST 2013


On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote:
> On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote:
> 
> > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote:
> 
> > 
> 
> > > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano
> 
> > 
> 
> > > 
> 
> > 
> 
> > > <steve+comp.lang.python at pearwood.info> wrote:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > Step 1: replace the modified version of the script with a known good copy.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > >
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Actually, this might be where the problem is, unfortunately. Not the
> 
> > 
> 
> > > 
> 
> > 
> 
> > > OP's fault at all. I went and looked at the post linked to, and it has
> 
> > 
> 
> > > 
> 
> > 
> 
> > > buggy indentation. (Quite possibly indicates that the author has
> 
> > 
> 
> > > 
> 
> > 
> 
> > > two-space tabs, and didn't notice a bug slipping in. I dunno.)
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Along the way, though, I learned that the script in question is
> 
> > 
> 
> > > 
> 
> > 
> 
> > > entirely for generating fake twitch.tv viewers so as to get your
> 
> > 
> 
> > > 
> 
> > 
> 
> > > stream highlighted fraudulently, so I'm rather less inclined to help.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Got a legitimate use for this, or are you just trying to cheat your
> 
> > 
> 
> > > 
> 
> > 
> 
> > > way to fame?
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > ChrisA
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks for the reply, the answer is yes and no, i already have about 2400 followers and half mil views, i just wanted to see if i could get it to work.
> 
> > 
> 
> > 
> 
> > 
> 
> > So after taking everybody's advice, fixed the indentation as mentioned by the expert above. :) After, this is what i came up with
> 
> > 
> 
> > 
> 
> > 
> 
> > 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
> 
> > 
> 
> > >>>
> 
> 
> 
> okay so i kinda get it now, running it in cmd, i use the following command - 
> 
> python twitch.py 10 10. I am running it within the scripts directory.
> 
> 
> 
> I get the following error in cmd:
> 
> 
> 
> Syntax Error: invalid syntax
> 
> >>>python twitch.py 10 10
> 
>    File "<stdin> line 1
> 
>      python twitch.py 10 10

is there a more effecient way of doing this? I just hold shift and right click to run cmd from the folder, 

File is located in C:\Python27\Scripts



More information about the Python-list mailing list