As a non-OSX owning kinda guy...

瀏覽次數:0 次
跳到第一則未讀訊息

Monkey

未讀,
2008年1月8日 下午4:20:312008/1/8
收件者:frontpython-discuss.
Guys,

Just some thoughts about the type of thing from a would-love-to-dev-
for-appletv-but-dont-got-a-mac user.

What I'd like to see is a (preferably pythonic if poss) module (or
module set) that lets me run my own python script and interact with
the menu.

I realise that there are problems with having multiple plugins with
different names on the same atv, so maybe this is going to have to
work less pythonic and more like XBMC scripts (in case you haven't
seen the way XBMC works, please look at http://www.xbmcscripts.com/
and www.xboxmediacenter.com to get an idea of what the hell I'm
talking about).

This would open up development to people who don't have Macs, don't do
Objective C and don't do Cocoa. There's also the hugely exciting
prospect of being able to port XBMC scripts over to AppleTV, something
I think that would completely change the user landscape.

I think doing anything that requires OSX or Cocoa knowledge would
limit the accessibility of this project to a narrower audience.

I'm happy to help out where I can but please bear in mind that a) I
don't have a Mac and b) I'm able to get a job done in python but am
not an uberpythonista.

But as the old motivational poster goes, "When you earnestly believe
you can compensate for a lack of skill by doubling your efforts,
there's no end to what you can't do."

What do others think?

John Sutherland

未讀,
2008年1月8日 晚上8:35:002008/1/8
收件者:frontpyth...@googlegroups.com


I've started giving some thought on 'how would you do development'
without a Mac.. here's what I've come up with:

1. You'll have to do the development on the ATV. I dont think there's
a way getting around it. I think you would have to do something like
have the full frappliance tree in a directory, and then edit the file
in that tree. Unlike what I've been doing, which is using a py2app -A
alias setup (uses simlinks.).. Means restarting the FrontRow or
whatever is it on there often, but thats not a huge deal.

2. If you don't want to learn pyobjc, you're going to be missing out
on a lot of the stuff that it can do.. We may be able to wrap some of
the basic controls, but if you want to do anything beyond what we
wrap, you're going have to learn pyobjc..There's really no way around
it.. We're pretty much going to be using the controls

3. There are differences between FrontRow and the ATV.. The primary
focus of this project is an SDK for FrontRow.. So when using our code,
you'll have to keep that in mind. I'll be happy to merge stuff in, as
long as it doesn't break stuff, or makes the code extremely ugly.. (to
the dismay of my co-workers, I reject anything that has a large amount
of "if-then" just to switch between modes..)

4. I doubt that there's going to be any really deep Python voodoo..
I've done quite a bit of the voodoo in my day job (I'm still
struggling to find a way to get metaclasses into my code at work :) ),
and I don't suspect that we'll need much here.. Most of the voodoo
will be the pyobjc stuff.

This is all theory, as I don't have an AppleTV to play with. And I
can't get one for at least a few months.. I'll take donations though :)

The code is also out there. Feel free to attempt it yourself.

--John

Steve Lord

未讀,
2008年1月9日 下午2:49:592008/1/9
收件者:frontpyth...@googlegroups.com
John Sutherland wrote:
>
> On Jan 8, 2008, at 2:20 PM, Monkey wrote:
>
>> Guys,
>>
> I've started giving some thought on 'how would you do development'
> without a Mac.. here's what I've come up with:
>
> 1. You'll have to do the development on the ATV. I dont think there's
> a way getting around it. I think you would have to do something like
> have the full frappliance tree in a directory, and then edit the file
> in that tree. Unlike what I've been doing, which is using a py2app -A
> alias setup (uses simlinks.).. Means restarting the FrontRow or
> whatever is it on there often, but thats not a huge deal.

I think that's a reasonable expectation. In fact I'd highly commend that
approach. I suspect that if we can get to a point where we can run a
python-based frappliance on the ATV that would allow you to invoke
external scripts then I could at least do the Frappliance. I know the
perlbin frappliance supports external script invocation but then again
perl's on ATV 1.0. Python's not.

>
> 2. If you don't want to learn pyobjc, you're going to be missing out
> on a lot of the stuff that it can do.. We may be able to wrap some of
> the basic controls, but if you want to do anything beyond what we
> wrap, you're going have to learn pyobjc..There's really no way around
> it.. We're pretty much going to be using the controls

The key issue for me with pyobjc is that it's again osx-only and appears
to have dependencies on Xcode (is this the case or can I use something
like Darwin GCC?). If we can find some way of getting all the
FrontPython dependencies up and running on ATV then it's a goer. If need
be I can spend my (limited) time working on wrapping the popular bits of
XBMC-related python around it but it will be a slow and arduous process
as I have very little free time these days. Still, it'd be worth
sticking to.

>
> 3. There are differences between FrontRow and the ATV.. The primary
> focus of this project is an SDK for FrontRow.. So when using our code,
> you'll have to keep that in mind. I'll be happy to merge stuff in, as
> long as it doesn't break stuff, or makes the code extremely ugly.. (to
> the dismay of my co-workers, I reject anything that has a large amount
> of "if-then" just to switch between modes..)

That's fine. Bear in mind that I'm going to spend some time reading up
on ATV development but have no way of compiling code. If you guys can
help me get to the point where it's python all the way from there on the
ATV then I can help with the debugging side of things.

First thing for me is to get Python running on ATV :) There goes my
weekend :'(

>
> 4. I doubt that there's going to be any really deep Python voodoo..
> I've done quite a bit of the voodoo in my day job (I'm still
> struggling to find a way to get metaclasses into my code at work :) ),
> and I don't suspect that we'll need much here.. Most of the voodoo
> will be the pyobjc stuff.

Metawhatwhat? What is this code concept of which you speak? ;)

Ok - if you're all willing to help me get this bootstrapped on an ATV
and I'll see what I can do about the pyobjc stuff.

>
> This is all theory, as I don't have an AppleTV to play with. And I
> can't get one for at least a few months.. I'll take donations though :)

I would but I've only got the one :(

John Sutherland

未讀,
2008年1月9日 下午3:44:162008/1/9
收件者:frontpyth...@googlegroups.com
>
> I think that's a reasonable expectation. In fact I'd highly commend
> that
> approach. I suspect that if we can get to a point where we can run a
> python-based frappliance on the ATV that would allow you to invoke
> external scripts then I could at least do the Frappliance. I know the
> perlbin frappliance supports external script invocation but then again
> perl's on ATV 1.0. Python's not.

Thats the nice thing about when we create the frappliance with py2app,
it takes all the python code, and drops it into the appliance.. I
believe the py2app stuff was created back when python wasn't standard
on Mac either, so they made it to include everything, including any
imported libraries. So we kinda get a Python install for 'free', its
part of the frappliance.. The disadvantage is that every frappliance
will have a copy of python..... With the limited memory, and lots of
plugins, well. That might be a problem. Maybe we create a single
'plugin' that runs all the other plugins (I've thought about that for
FrontRow in general too.) THen its only one copy of python.

> The key issue for me with pyobjc is that it's again osx-only and
> appears
> to have dependencies on Xcode (is this the case or can I use something
> like Darwin GCC?). If we can find some way of getting all the
> FrontPython dependencies up and running on ATV then it's a goer. If
> need
> be I can spend my (limited) time working on wrapping the popular
> bits of
> XBMC-related python around it but it will be a slow and arduous
> process
> as I have very little free time these days. Still, it'd be worth
> sticking to.

Yes, it Mac only, but its included in the appliance (like I said
above..).. So there's no need to compile anything..

> That's fine. Bear in mind that I'm going to spend some time reading up
> on ATV development but have no way of compiling code. If you guys can
> help me get to the point where it's python all the way from there on
> the
> ATV then I can help with the debugging side of things.

I haven't compiled anything, just ran FrontRow, which calls the
frappliance, which runs python, which 'compiles' the script..

> First thing for me is to get Python running on ATV :) There goes my
> weekend :'(
>

> Ok - if you're all willing to help me get this bootstrapped on an ATV
> and I'll see what I can do about the pyobjc stuff.

What I can do is package something up for you that I *THINK* might
work on ATV.. Or at least appear in the menus.. If it appears, then
we're golden.. I'll see if I can put it together tonight..

The fun part is that the framework paths might be different... If you
can tell me what directory "BackRow.framework" is, that'll help..

--John

Steve Lord

未讀,
2008年1月9日 下午4:05:312008/1/9
收件者:frontpyth...@googlegroups.com
John Sutherland wrote:
>
> Thats the nice thing about when we create the frappliance with py2app,
> it takes all the python code, and drops it into the appliance.. I
> believe the py2app stuff was created back when python wasn't standard
> on Mac either, so they made it to include everything, including any
> imported libraries. So we kinda get a Python install for 'free', its
> part of the frappliance.. The disadvantage is that every frappliance
> will have a copy of python..... With the limited memory, and lots of
> plugins, well. That might be a problem. Maybe we create a single
> 'plugin' that runs all the other plugins (I've thought about that for
> FrontRow in general too.) THen its only one copy of python.

I think that the single plugin idea is the way forward. Something like a
'scripts' plugin would probably work fine and is what I have in mind. Am
I right in thinking that we'd only need to import modules as scripts are
called, meaning that the memory would only get used for each individual
script?

I've also just managed to get OSX Python kind of installed on ATV. Tk
doesn't work so IDLE's out of the question but python on the command
line seems to be working ok. Haven't had a chance to try anything extra
yet but pyobjc wanted to compile so that failed at the first hurdle as I
don't have a full compiler suite, just basic gcc for darwin.

>
> Yes, it Mac only, but its included in the appliance (like I said
> above..).. So there's no need to compile anything..

Sweeeet...

>
>> That's fine. Bear in mind that I'm going to spend some time reading up
>> on ATV development but have no way of compiling code. If you guys can
>> help me get to the point where it's python all the way from there on
>> the
>> ATV then I can help with the debugging side of things.
>
> I haven't compiled anything, just ran FrontRow, which calls the
> frappliance, which runs python, which 'compiles' the script..
>
>> First thing for me is to get Python running on ATV :) There goes my
>> weekend :'(
>>
>> Ok - if you're all willing to help me get this bootstrapped on an ATV
>> and I'll see what I can do about the pyobjc stuff.
>
> What I can do is package something up for you that I *THINK* might
> work on ATV.. Or at least appear in the menus.. If it appears, then
> we're golden.. I'll see if I can put it together tonight..
>
> The fun part is that the framework paths might be different... If you
> can tell me what directory "BackRow.framework" is, that'll help..

/System/Library/PrivateFrameworks/BackRow.framework/

Incidentally, have you had a look at this, there may be some
similarities that could make things easier:

http://wiki.awkwardtv.org/wiki/BackRow_Developers%27_Kit

>
> --John
>
>

Steve

John Sutherland

未讀,
2008年1月9日 下午4:42:562008/1/9
收件者:frontpyth...@googlegroups.com
> I think that the single plugin idea is the way forward. Something
> like a
> 'scripts' plugin would probably work fine and is what I have in
> mind. Am
> I right in thinking that we'd only need to import modules as scripts
> are
> called, meaning that the memory would only get used for each
> individual
> script?


I was mainly concerned with the number of python processes, and the
overhead of each one.. if we go to single plugin, and run stuff from
there, I wouldn't worry about it as much.. Scripts are small..


>
>
> I've also just managed to get OSX Python kind of installed on ATV. Tk
> doesn't work so IDLE's out of the question but python on the command
> line seems to be working ok. Haven't had a chance to try anything
> extra
> yet but pyobjc wanted to compile so that failed at the first hurdle
> as I
> don't have a full compiler suite, just basic gcc for darwin.

You don't need that version of python.. As I was saying, when you get
an frappliance, it comes with python in there. Frappliances are like
Mac applications, they are actually directories full of stuff.. Here's
what the frappliance looks like for my Myth plugin (dir struct only):

./FrontMyth.frappliance
./FrontMyth.frappliance/Contents
./FrontMyth.frappliance/Contents/Frameworks
./FrontMyth.frappliance/Contents/Frameworks/Python.framework
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/include
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/include/python2.5
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/lib
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/lib/python2.5
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/lib/python2.5/config
./FrontMyth.frappliance/Contents/Frameworks/Python.framework/Versions/
2.5/Resources
./FrontMyth.frappliance/Contents/MacOS <--------- This actually has a
python binary in it.
./FrontMyth.frappliance/Contents/Resources
./FrontMyth.frappliance/Contents/Resources/English.lproj
./FrontMyth.frappliance/Contents/Resources/include
./FrontMyth.frappliance/Contents/Resources/include/python2.5
./FrontMyth.frappliance/Contents/Resources/lib
./FrontMyth.frappliance/Contents/Resources/lib/python2.5
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/config
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/lib-dynload
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/lib-dynload/
AppKit
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/lib-dynload/
CoreFoundation
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/lib-dynload/
Foundation
./FrontMyth.frappliance/Contents/Resources/lib/python2.5/lib-dynload/
objc


> /System/Library/PrivateFrameworks/BackRow.framework/

Cool, this is the same as FrontRow. That makes life easier.

> Incidentally, have you had a look at this, there may be some
> similarities that could make things easier:
>
> http://wiki.awkwardtv.org/wiki/BackRow_Developers%27_Kit

I looked at it a bit.. About the only thing I can use is the header
files, so I can see the difference between ATV and FR.

I'll try to have something for you in a few hours.. In theory, all
you'll need to do is untar what i give you, and restart the ATV
frontRow equivilent. Delete that version of python you made, you won't
need it.

--John


John Sutherland

未讀,
2008年1月9日 晚上11:50:172008/1/9
收件者:frontpyth...@googlegroups.com
Ok, I've created a plugin that I think might work:

http://garion.tzo.com/FrontRowPlugins/FrontPython.frappliance.tar.gz

Untar that to wherever the .frappliance's go, and restart the frontend..

You should see a menu item "FrontPython" at the top, and if you select
it, it'll pop up some hello world thing.

This is more or less the Hello world from the FRAppliance 101 sample
on the Awkward TV wiki..

If it doesn't work (obviously, this is untested..), check the /var/log/
system.log for errors..

--John

--John


Steve Lord

未讀,
2008年1月10日 凌晨3:49:462008/1/10
收件者:frontpyth...@googlegroups.com
John Sutherland wrote:
> Ok, I've created a plugin that I think might work:
>
> http://garion.tzo.com/FrontRowPlugins/FrontPython.frappliance.tar.gz
>
> Untar that to wherever the .frappliance's go, and restart the frontend..

Done, Finder wouldn't restart so on finding it manually I saw this:

bash-2.05b# /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
2008-01-10 08:45:02.734 Finder[10759] settings facade
<ATVSettingsFacade: 0x130a440>
2008-01-10 08:45:02.984 Finder[10759] In AppLauncher classname
2008-01-10 08:45:02.984 Finder[10759] +[AppLauncherAppliance className]
called for whitelist check
2008-01-10 08:45:03.220 Finder[10759] Symbol not found: _fsync$UNIX2003
Referenced from:
/System/Library/CoreServices/Finder.app/Contents/PlugIns/FrontPython.frappliance/Contents/Frameworks/Python.framework/Versions/2.5/Python
Expected in: /usr/lib/libSystem.B.dylib
2008-01-10 08:45:03.220 Finder[10759] FrontPython has encountered a
fatal error, and will now terminate.
See the Console for a detailed dyld error
messagePlugIns/FrontPython.frappliance/Contents/Frameworks/Python.framework/Versions/2.5/Python
SSE3EMU - This code is copyright 2007 Turbo (Mike Byrne) and MAY NOT be
distributed. All rights reserved.
2008-01-10 08:45:07.198 Finder[10759] *** -[NSBundle load]: Error
loading code
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Resources/ExtraPatches.plugin/Contents/MacOS/ExtraPatches
for bundle
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Resources/ExtraPatches.plugin,
error code 4 (link edit error code 4, error number 0 (Library not
loaded:
/System/Library/Frameworks/InstantMessage.framework/Versions/A/InstantMessage
Referenced from:
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Resources/ExtraPatches.plugin/Contents/MacOS/ExtraPatches
Reason: image not found))
2008-01-10 08:45:07.198 Finder[10759] *** <QCNodeManager | namespace =
"com.apple.QuartzComposer" | 225 nodes>: Could not load principal class
from bundle at path
"/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Resources/ExtraPatches.plugin"

Finder finally started but without the FrontPython app showing. ATV has
no system.log or messages files in /var/log.

John Sutherland

未讀,
2008年1月10日 下午1:31:082008/1/10
收件者:frontpyth...@googlegroups.com

On Jan 10, 2008, at 1:49 AM, Steve Lord wrote:

> 2008-01-10 08:45:03.220 Finder[10759] Symbol not found: _fsync
> $UNIX2003
> Referenced from:
> /System/Library/CoreServices/Finder.app/Contents/PlugIns/
> FrontPython.frappliance/Contents/Frameworks/Python.framework/
> Versions/2.5/Python
> Expected in: /usr/lib/libSystem.B.dylib
> 2008-01-10 08:45:03.220 Finder[10759] FrontPython has encountered a
> fatal error, and will now terminate.
> See the Console for a detailed dyld error
> messagePlugIns/FrontPython.frappliance/Contents/Frameworks/
> Python.framework/Versions/2.5/Python

Uhhhhhhhh.... I can make a few guesses, but thats about it... One is
that the Python I have is Leopard only.. Luckily, I still have my
GF's macbook on Tiger.. Attached is another one to try....

FrontPython.frappliance-2.tar.gz

Steve Lord

未讀,
2008年1月10日 下午2:05:242008/1/10
收件者:frontpyth...@googlegroups.com
John Sutherland wrote:
>
> Uhhhhhhhh.... I can make a few guesses, but thats about it... One is
> that the Python I have is Leopard only.. Luckily, I still have my
> GF's macbook on Tiger.. Attached is another one to try....

Yeah, ATV is based on Tiger and has issues with Leopard binaries. I have
a different error now though - seems to be looking for Python.framework
which doesn't exist. Are you using Python 2.3 for the tiger build? I
noticed your tarball wasn't the full Frappliance so I think you've got a
conflict between 2.3 tiger and 2.5 leopard.

2008-01-10 18:50:08.886 Finder[10858] settings facade
<ATVSettingsFacade: 0x130a440>
2008-01-10 18:50:08.984 Finder[10858] In AppLauncher classname
2008-01-10 18:50:08.984 Finder[10858] +[AppLauncherAppliance className]
called for whitelist check
2008-01-10 18:50:09.111 Finder[10858] FrontPython has encountered a


fatal error, and will now terminate.

2008-01-10 18:50:09.111 Finder[10858] A Python runtime could be located.
You may need to install a framework build of Python, or edit the
PyRuntimeLocations array in this
bundle/System/Library/Frameworks/Python.framework/Versions/2.3/Pythonthon


SSE3EMU - This code is copyright 2007 Turbo (Mike Byrne) and MAY NOT be
distributed. All rights reserved.

2008-01-10 18:50:11.439 Finder[10858] *** -[NSBundle load]: Error

John Sutherland

未讀,
2008年1月10日 下午2:43:562008/1/10
收件者:frontpyth...@googlegroups.com

On Jan 10, 2008, at 12:05 PM, Steve Lord wrote:
>
> Yeah, ATV is based on Tiger and has issues with Leopard binaries. I
> have
> a different error now though - seems to be looking for
> Python.framework
> which doesn't exist. Are you using Python 2.3 for the tiger build? I
> noticed your tarball wasn't the full Frappliance so I think you've
> got a
> conflict between 2.3 tiger and 2.5 leopard.
>
> 2008-01-10 18:50:09.111 Finder[10858] FrontPython has encountered a
> fatal error, and will now terminate.
> 2008-01-10 18:50:09.111 Finder[10858] A Python runtime could be
> located.
> You may need to install a framework build of Python, or edit the
> PyRuntimeLocations array in this
> bundle/System/Library/Frameworks/Python.framework/Versions/2.3/
> Pythonthon

Ugh.. A bit of quick research says that if you build using the
installed Python, it'll -not- include the Python framework. Weird. It
does on Leopard.. I'll try and get a python2.5 install with objc
installed on my tiger box (annoying my gf, but what the hell)..

I'll make one more attempt to create a package for you tonight... If
it doesn't work, I'm going to call its quits until I get an AppleTV
myself, or someone else takes up the cause... I really want to get
working on the main development for FrontRow..

--John

John Sutherland

未讀,
2008年1月10日 下午3:26:032008/1/10
收件者:frontpyth...@googlegroups.com
Ok, here's my last attempt for now: http://garion.tzo.com/FrontRowPlugins/FrontPython.frappliance-3.tar.gz

Made with Python2.5 and PyObjC 1.4 on Tiger

--John


Steve Lord

未讀,
2008年1月10日 下午4:05:332008/1/10
收件者:frontpyth...@googlegroups.com
Thanks for all the help John, looks like we got a bit further but not as
far as I'd hoped - FYI here's what I get:

2008-01-10 21:02:00.266 Finder[11010] settings facade
<ATVSettingsFacade: 0x130a440>
2008-01-10 21:02:00.365 Finder[11010] In AppLauncher classname
2008-01-10 21:02:00.365 Finder[11010] +[AppLauncherAppliance className]
called for whitelist check
2008-01-10 21:02:01.541 Finder[11010] *** Uncaught exception:
<OC_PythonException> <type 'exceptions.TypeError'>: Missing argument: self
Trace/BPT trap

My guess would be that Python's being called correctly but something's
happening at the PyObjC layer - I'll have a look into this over the
weekend and see if I can confirm that Python's at lesat being called and
that it's something I can fix *in python* - if so then we win :)

Thanks for all your help, sorry I couldn't give you better news...


--
Steve Lord
Mandalorian Security Services
w: http://www.mandalorian.co.uk
e: sl...@mandalorian.co.uk
Tel:+44 (0)1256 830 144 Unit B, Riverside
Fax:+44 (0)1256 651 056 View, Old Basing,
Mob:+44 (0)7883 027 877 Hampshire RG24 7AL

John Sutherland

未讀,
2008年1月10日 下午6:01:222008/1/10
收件者:frontpyth...@googlegroups.com

On Jan 10, 2008, at 2:05 PM, Steve Lord wrote:

> 2008-01-10 21:02:00.266 Finder[11010] settings facade
> <ATVSettingsFacade: 0x130a440>
> 2008-01-10 21:02:00.365 Finder[11010] In AppLauncher classname
> 2008-01-10 21:02:00.365 Finder[11010] +[AppLauncherAppliance
> className]
> called for whitelist check
> 2008-01-10 21:02:01.541 Finder[11010] *** Uncaught exception:
> <OC_PythonException> <type 'exceptions.TypeError'>: Missing
> argument: self
> Trace/BPT trap
>
> My guess would be that Python's being called correctly but something's
> happening at the PyObjC layer - I'll have a look into this over the
> weekend and see if I can confirm that Python's at lesat being called
> and
> that it's something I can fix *in python* - if so then we win :)
>
> Thanks for all your help, sorry I couldn't give you better news...
>

One thing to try might be to use the classmethod decorator, instead of
the function... I switched to the function, cause when I first
switched to 2.3, it doesn't support decorators... Try switching it
back..

--John


Steve Lord

未讀,
2008年1月12日 上午10:06:292008/1/12
收件者:frontpyth...@googlegroups.com
John Sutherland wrote:
>
> One thing to try might be to use the classmethod decorator, instead of
> the function... I switched to the function, cause when I first
> switched to 2.3, it doesn't support decorators... Try switching it
> back..
>
> --John

Are you referring to using classmethod on applianceControllerWithScene?
Apologies for my confusion as I've not used classmethod before. I know
the statement:

className = classmethod(className )

is definitely working fine. The next part:

def applianceControllerWithScene_(self,scene):

isn't getting called. It appears that the script executes the initial
component, then either exits or seems to have some form of a hissy fit.

I'm going to work through the rest of the python code available to place
some markers to see what's happening, although without a debugger this
is going to be slow. Any ideas or pointers from anyone would be great
right now :)

John Sutherland

未讀,
2008年1月12日 下午2:53:122008/1/12
收件者:frontpyth...@googlegroups.com
> Are you referring to using classmethod on
> applianceControllerWithScene?
> Apologies for my confusion as I've not used classmethod before. I know
> the statement:
>
> className = classmethod(className )

So you are saying that its calling the className method? Ok, then its
probably ok..

What classmethod does is make it so that when you call that method, it
sends the class, instead of the instance (a class, instead of
self...).. So there's no 'instance' involved..

> is definitely working fine. The next part:
>
> def applianceControllerWithScene_(self,scene):
>
> isn't getting called. It appears that the script executes the initial
> component, then either exits or seems to have some form of a hissy
> fit.

Since I figured out some of the python debugging (see my other
messsage from earlier), you might want to try something..

At the top of your code (ok, after the imports), add the following
lines:

import PyObjCTools.Debugging
PyObjCTools.Debugging.installVerboseExceptionHandler()

That *should* increase the amount of exception logging.. That may help
us figure out what needs to get done.

--John

回覆所有人
回覆作者
轉寄
0 則新訊息