Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6554087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:39:31+00:00 2026-05-25T12:39:31+00:00

EDIT: SOLVED–SOURCE CODE HERE: http://matthewdowney20.blogspot.com/2011/09/source-code-for-roku-remote-hack.html thanks in advance for reading and possibly answering this.

  • 0

EDIT: SOLVED–SOURCE CODE HERE: http://matthewdowney20.blogspot.com/2011/09/source-code-for-roku-remote-hack.html

thanks in advance for reading and possibly answering this. So I have a slice of code that looks like this (the commands Down() Select() and Up() are all predefined):

def c1(row):
   row_down = row
   row_up = row
   while row_down > '1':
       Down()
       row_down = row_down - 1
       time.sleep(250)
   Select()
   time.sleep(.250)
   while row_up > '1':
       Up()
       row_up = row_up - 1
       time.sleep(250)

So when I run this with either c1(‘3’) or c1(3) (not jut 3, any number does this) it stops responding, no error or anything, but it executes the first Down() command, and it doesnt seem to get past the row_down = row_down – 1 . So i figure maybe it is stuck on time.sleep(.250), because it isnt executing the Select(), so if i remove time.sleep(.250) from the code i get an error like this:

Traceback (most recent call last):
  File "test.py", line 338, in <module>
    c1('3')
  File "test.py", line 206, in c1
    row_down = row_down - 1
TypeError: unsupported operand type(s) for -: 'str' and 'int'

this code snippet is part of a larger program designed for controlling the roku player from a computer, and so far everything has worked but this, which is to automate the typing in the search field, so that you do not have to continually scroll until you find a letter and select. c1(row) would be column 1 row x, if any of you would like the source code for the program over all, i would be happy to send it out. Anyway thanks for listening.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:39:31+00:00Added an answer on May 25, 2026 at 12:39 pm

    Perhaps you meant

    while row_down > 1:
    

    (note 1 is written without quotes). If so, call c1 with c1(3) not c1('3').


    Also, in CPython (version 2, but not version 3) integers are comparable to strings, but the answer is not what you might expect:

    3 > '1'
    # False
    

    When comparing any integer to any string, the integer is always less than string because (believe it or not!) i (as in integer) comes before s (as in string) in the alphabet.


    As TokenMacGuy has already pointed out, addition of integers with strings raises a TypeError:

    '3' - 1
    # TypeError: unsupported operand type(s) for +: 'int' and 'str'
    

    This might explain the error you are seeing when calling c1('3').

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Solved the problem, thanks to this forum post: http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 . Thanks everyone! I've
EDIT: Solved with a hack for now. Added at line 473: if (isset($this->_termsFreqs[$termId][$docId])) {
EDIT: Solved. I was unware that enabling a language extension in the source file
EDIT: SOLVED! answer below first code box When i try to connect with a
Edit : Solved, there was a trigger with a loop on the table (read
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know
Edit: I have solved this by myself. See my answer below I have set
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
Edit: Solved. Hi, I'm starting with Qt, I try to connect a slot to
[Edit] Solved, small mistake done by me being an ant beginner. In the test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.