TiVo Community Forum banner
101 - 120 of 232 Posts

·
Well-Known Mumbler
Joined
·
11,685 Posts
Discussion Starter · #101 ·
Yeah, the problem there is a Python thing -- if you remove items from a list while you're iterating over it, it gets confused. (The remove() method of Views also removes them from their parents' "children" lists.) You can get around that by using a copy of the list -- maybe something like this:

Code:
for child in self.screen.children[:]:  # [:] makes a copy
    child.remove_resource()
    child.remove()
 

·
Well-Known Mumbler
Joined
·
11,685 Posts
Discussion Starter · #104 ·
Yeah, you host it yourself (however you want to arrange that), and just give them the URL. There's a Python app there right now: my Reversi game.

Hosting is the hard part. Since I've so far been unable to get HME working as CGI (and am increasingly pessimistic about the prospect), you pretty much have to be able to run start.py as a server and bind your own port. This means a more expensive plan. For now, I'm just running Reversi from my own PC.
 

·
Registered
Joined
·
44 Posts
Quick Start
-----------

In Windows:

python start.py

This will serve the example apps. The default port is 9042 (not TiVo's
7288). To see more options, run "./start.py --help".
I am a programmer but have never used python. I mostly do C/C++.

I know I am missing one little step.

From your quick start, start.py runs and is obviously sitting there waiting to be told something after it displays "Server Starts".

So,I go into the animate directory,for example, and try __init__.py but all I get from any of the apps, is this:

D:\Tivo\pytivo\hme-python-0.16\animate>__init__.py
Traceback (most recent call last):
File "D:\Tivo\pytivo\hme-python-0.16\animate\__init__.py", line 13, in <module
>
from hme import *
ImportError: No module named hme


I assume then that I am supposed to also run hme.py but when I do, all it does is simply exit back to the command line.

What am I doing wrong or what step am I missing?

Thank You
 

·
Well-Known Mumbler
Joined
·
11,685 Posts
Discussion Starter · #107 ·
From your quick start, start.py runs and is obviously sitting there waiting to be told something after it displays "Server Starts".
No, it's just waiting for requests from a TiVo (or the simulator), which will be shown in that window. There's nothing more for you to type. Just go to your TiVo and pull up the Music, Photos & More Showcases menu.
 

·
Registered
Joined
·
44 Posts
No, it's just waiting for requests from a TiVo (or the simulator), which will be shown in that window. There's nothing more for you to type. Just go to your TiVo and pull up the Music, Photos & More Showcases menu.
Thank you.

Turns out that it was NOT properly running.

I was not sure what I was supposed to see so your reply was all I needed.

After you told me this, I made some change to the config.ini file and I am now getting the printfs of the HTTP connections.

I see the various apps on the Tivo now.

The kicker is that I did not save the config.ini and I edited it and NOW I do not get any connections.
 

·
Registered
Joined
·
44 Posts
I am not sure what I have done but the server no longer seems to be connecting to the Tivo.

When I run the server, it says that it is registering the various apps but I no longer get print statements that says it is connected.

I can see the various apps ON the Tivo but of course, when I Select them I get a file not found error since the server is not connecting anymore.

Any ideas?

I guess you can tell that I am new to this. Both the Tivo HME as well as Python.

I am trying this on a TIVO HD XL

Thanks
 

·
Registered
Joined
·
1,221 Posts
How can I wrap text to a text window? If a new line character is added anywhere in the text string then the simulator will wrap that text correctly but the same text doesn't wrap when viewed with my Tivo HD. Am I going to have to write code to wrap the text manually?
 

·
Well-Known Mumbler
Joined
·
11,685 Posts
Discussion Starter · #112 ·
How can I wrap text to a text window? If a new line character is added anywhere in the text string then the simulator will wrap that text correctly but the same text doesn't wrap when viewed with my Tivo HD.
I'm not sure what you're saying here. New line characters should always be processed, and are, in my experience. But as for automatic wrapping, that doesn't happen unless you set the RSRC_TEXT_WRAP flag. These are two separate issues.
 

·
Registered
Joined
·
44 Posts
Show me the exact messages, from both sides. Also your config.ini.
There is not much to show you.

Here is the ini file:
[hmeserver]
port=7288

#zeroconf=False
basepath=d:\Tivo\pytivo\hme-python-0.16
datapath=D:\Tivo\pytivo\hme-python-0.16

Here is the results from running start.py with that config.ini:
D:\Tivo\pytivo\hme-python-0.16>start.py
HME Server for Python 0.16
Skipping: picture - No module named Image
Wed Jan 14 12:45:04 2009 Server Starts
Registering: animate
Registering: clock
Registering: effects
Registering: fontinfo
Registering: hello
Registering: test
Registering: tictactoe
Registering: transition

I get the same exact resultrs with NO config.ini file
 

·
Registered
Joined
·
1,221 Posts
I'm not sure what you're saying here. New line characters should always be processed, and are, in my experience. But as for automatic wrapping, that doesn't happen unless you set the RSRC_TEXT_WRAP flag. These are two separate issues.
I was talking about automatic wrapping. I didn't know there was a flag for it. When the text has a new line character anywhere in the text the simulator will wrap all the text automaticly as if the flag was set.
 

·
Registered
Joined
·
44 Posts
Really? Huh. That's another bug in the simulator, then.

Joe Q: You've overlooked the part where I said "from both sides"; i.e, the TiVo side as well as the server.
I appreciate all the help as well as patience.

As I had said, Last night, one time I got a connection from the Server and the Tivo was displaying the clock/fontinfo/etc. as items to choose on the menu.

I just took this photo of the tivo and I see they are now gone.

So here is 'the tivo side':
 

Attachments

·
Registered
Joined
·
44 Posts
After I found a bug on the SDK website where they have the wrong name for sampleS.jar, I finally was able to use the simulator and the java test sample.

With that, I could verify using the simulator.

(see http://tivohme.sourceforge.net/docs/hmesdk/01_Overview.html#wp998762)

I had all your code under this path "d:\tivo\pytivo\hme-python-0.16" but it would not work so I got your code to work by moving it all up under d:\hme and deleting my config.ini file

Your apps show up in the Java simulator now as well as on my Tivo

Here is the output of start.py
HME Server for Python 0.16
Skipping: picture - No module named Image
Wed Jan 14 18:00:35 2009 Server Starts
Registering: animate
Registering: clock
Registering: effects
Registering: fontinfo
Registering: hello
Registering: test
Registering: tictactoe
Registering: transition
192.168.1.5:5239 - - [14/Jan/2009 18:00:41] "GET /animate/icon.png HTTP/1.1" 200
-
192.168.1.5:5241 - - [14/Jan/2009 18:00:41] "GET /animate/icon.png HTTP/1.1" 200
-
192.168.1.5:5242 - - [14/Jan/2009 18:00:41] "GET /effects/icon.png HTTP/1.1" 200
-
192.168.1.5:5243 - - [14/Jan/2009 18:00:41] "GET /effects/icon.png HTTP/1.1" 200
-
192.168.1.5:5244 - - [14/Jan/2009 18:00:41] "GET /fontinfo/icon.png HTTP/1.1" 20
0 -
192.168.1.5:5245 - - [14/Jan/2009 18:00:41] "GET /fontinfo/icon.png HTTP/1.1" 20
0 -
192.168.1.5:5246 - - [14/Jan/2009 18:00:41] "GET /hello/icon.png HTTP/1.1" 200 -

192.168.1.5:5247 - - [14/Jan/2009 18:00:41] "GET /hello/icon.png HTTP/1.1" 200 -

192.168.1.5:5248 - - [14/Jan/2009 18:00:41] "GET /test/icon.png HTTP/1.1" 200 -
192.168.1.5:5249 - - [14/Jan/2009 18:00:41] "GET /test/icon.png HTTP/1.1" 200 -
192.168.1.5:5250 - - [14/Jan/2009 18:00:41] "GET /tictactoe/icon.png HTTP/1.1" 2
00 -
192.168.1.5:5251 - - [14/Jan/2009 18:00:41] "GET /tictactoe/icon.png HTTP/1.1" 2
00 -

Thanks
 
101 - 120 of 232 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top