[SGVLUG] Python Programming

Rae Yip rae.yip at gmail.com
Mon Sep 29 09:36:12 PDT 2008


Sorry for sitting on this one. Python is a pretty decent language,
improving in functionality all the time. I like it because it makes
simple projects easy (and hard projects possible).

One thing it is not is high-performance, at least not without some
optimisation. This is not to say it's slow (it's comparable with perl
speeds), but if you have tight loops that you need to call many times,
it may be better to write a module in C (or use Cython or Pyrex), and
leave the high-level logic to Python.

You also need to watch out for circular references, especially in
long-running code. These can easily develop into memory leaks if not
handled properly.

That said, what is your goal with MythTV? Just to replace the TV and
recording menus, or do you want to change the TV viewer (this may
include the OSD)? The latter might not be best done in pure Python.

In any case, I'd be interested in what you'd like to change - I also
have some peeves with MythTV but I've been using it so long I can't
really think of better ways to do things.

Also, MythTV's frontend has a lot of good things, but stability could
be improved, for one. I haven't dug into it because the code's a bit
of a mess, and it would take much effort for a single person to
rewrite.

One final thing: Python has many different graphics APIs available,
but the most mature are probably wxPython and Pygame. I don't know if
wxPython allows a full-screen mode; Pygame definitely does, but you
may need to make your own GUI widgets (necessary anyway if you're
going for a unique look).

-Rae.

On Sat, Sep 27, 2008 at 6:37 AM, Joel Witherspoon
<joel.witherspoon at gmail.com> wrote:
> After seeing Michael's rousing presentation on Myth TV and using it for a
> few weeks, I'm interested in developing a new front-end for Linux MCE or
> Myth TV using Python. I've never used Python, so I'm wondering if you all
> have any pitfall stories or good experiences using it.
>


More information about the SGVLUG mailing list