Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Bob Ippolito
On Mar 1, 2005, at 1:52 AM, Roger Binns wrote:
I believe it's Quicktime.Quicktime and Quicktime.Qt  -- it doesn't 
override anything that's implemented in 2.3
Those are the ones.  The former has hundreds of constants and the 
latter has hundreds of methods.  Needless to say I have absolutely
no idea what to call to get my conversion done.
Yeah, well, I don't think anyone else here has much of an idea, but 
 would 
be a good place to start.  I can tell you from experience that 
QuickTime is a bit of a pain (why is the Python module named 
Quicktime?).

If you can get ahold of Kevin Marks, he would probably be able to at 
least point you in the right direction.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Roger Binns
I believe it's Quicktime.Quicktime and Quicktime.Qt  -- it doesn't 
override anything that's implemented in 2.3
Those are the ones.  The former has hundreds of constants and the 
latter has hundreds of methods.  Needless to say I have absolutely
no idea what to call to get my conversion done.

Roger
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Bob Ippolito
On Mar 1, 2005, at 12:24 AM, Roger Binns wrote:
Easier still is Python23Compat:
http://bob.pythonmac.org/archives/2005/02/02/python23compat/
Ok, I installed that and did:
 import Carbon.Qt
 help(Carbon.Qt)
I couldn't see any methods for getting codecs or feeding them
wav/pcm information.
I believe it's Quicktime.Quicktime and Quicktime.Qt  -- it doesn't 
override anything that's implemented in 2.3

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Roger Binns
Easier still is Python23Compat:
http://bob.pythonmac.org/archives/2005/02/02/python23compat/
Ok, I installed that and did:
 import Carbon.Qt
 help(Carbon.Qt)
I couldn't see any methods for getting codecs or feeding them
wav/pcm information.
Roger
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Bob Ippolito
On Feb 28, 2005, at 11:50 PM, Roger Binns wrote:
The quicktime module for Python 2.4 has a lot of new functionality 
(and it's also available as an addon for Python 2.3, through my 
experimental database for Package Manager). Access to codecs is one 
of the things that has been added.
Can you please give me some direction on how to get this into Python
2.3?  (The documentation, whats installed, various urls etc all
contradict each other on what packaging systems are actually currently
in use and maintained).
Easier still is Python23Compat:
http://bob.pythonmac.org/archives/2005/02/02/python23compat/
-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Roger Binns
The quicktime module for Python 2.4 has a lot of new functionality (and 
it's also available as an addon for Python 2.3, through my experimental 
database for Package Manager). Access to codecs is one of the things 
that has been added.
Can you please give me some direction on how to get this into Python
2.3?  (The documentation, whats installed, various urls etc all
contradict each other on what packaging systems are actually currently
in use and maintained).
But, of course, I've only tested it very lightly and it's very possible 
I forgot some essential things. Could you please check whether Python 
2.4 (or its Carbon.Qt module used in 2.3) allows you to access the 
codec you need?
I will do so for Python 2.3.
Roger
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] SciPy installer for Panther Python, anyone?

2005-02-28 Thread Brendan Simons
On 28-Feb-05, at 6:00 AM, [EMAIL PROTECTED] wrote:
From: Peter Maxwell <[EMAIL PROTECTED]>
Date: February 27, 2005 11:22:51 PM EST
To: pythonmac-sig@python.org
Subject: [Pythonmac-SIG] SciPy installer for Panther Python, anyone?
No guarantees, but my latest attempt to compile SciPy seems to have 
worked:

http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip
 -- Peter Maxwell
Sweet.  Thanks Peter.  I was just about to resign myself to writing my 
own non-linear function optimizer.  You just saved me a lot of work!

Brendan
__ 
Post your free ad now! http://personals.yahoo.ca
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread Bob Ippolito
On Feb 28, 2005, at 6:16 PM, has wrote:
Bob wrote:
Well I can verify that there definitely are serious problems with 
CFURL after screwing around with it a bit.
Figures. Yuck. Must be bgen's revenge for all the nasty things we 
ever said about it.
All the nasty things I ever said about it are because of things like 
this :)
But it's so quick! As long as you're Jack and know how to use it. If 
you're not Jack, I guess you're screwed. On second thoughts, given 
Jack's existing To-Do list is probably the size of K2 he's probably 
screwed too. :p

I wonder if it'd be easier just to hand-code wrappers using Pyrex, 
perhaps with a very basic macro system that automates only the 
simplest of tasks. A lower level automation that works well might 
ultimately be more productive than total automation that tends towards 
flakiness. While a single person wouldn't be able to wrap nearly as 
many APIs, the wrappers that did get done would probably be more 
reliable due to the extra attention; maybe a bit nicer to use too. 
Plus it'd make it easier for more folk to write these wrappers, taking 
some pressure off Jack.
Actually, the easiest way is to just use PyObjC!  It is extremely well 
suited to tackle wrapping CoreFoundation functions and types since they 
conform to the NSObject protocol.  Many of them have toll-free bridges 
into their Objective-C types, which have a richer interface, and PyObjC 
understands this too.

Additionally, since PyObjC wraps the functions with the signature they 
actually have, it's obvious (given Apple documentation or headers) how 
to use them.  The way bgen wraps them attempts to objectify them, which 
tends to cause more problems than it solves -- at least for me.  I 
wouldn't think to look for a method of CFStringRef to create a CFURL!

Too bad :)  If you're writing Mac OS X specific code you **really** 
should have PyObjC anyway.
Oh, I have. It's all the casual users who don't that present the 
problem. If PyObjC is going to be so essential to all aspects of 
MacPython usage then it's really time for it to join the standard 
library.
So let's offer a package that includes appscript, PyObjC, and py2app 
in one installer.
I do recall Jack saying something about maybe having a smaller core 
library and moving a lot of the non-essential stuff to an external 
package that could be managed independently; kind of a 'second tier'. 
Perhaps that would be the way to do it: more flexibility for 
individual package developers since they're not tied to the official 
Python upgrade cycle while still providing a quick and simple one-stop 
installation for users. Even modules that are destined for the core 
library would benefit from spending some time at this halfway house 
first while all the kinks are worked out (e.g. OSA.so). Might be worth 
exploring to see what sort of infrastructure it would require to run.
The Windows guys seem to get along just fine with this approach (re: 
win32all).  There are a select few Win32-specific modules in the core, 
but most of the things you actually need are elsewhere.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread has
Bob wrote:
Well I can verify that there definitely are serious problems with 
CFURL after screwing around with it a bit.
Figures. Yuck. Must be bgen's revenge for all the nasty things we 
ever said about it.
All the nasty things I ever said about it are because of things like this :)
But it's so quick! As long as you're Jack and know how to use it. If 
you're not Jack, I guess you're screwed. On second thoughts, given 
Jack's existing To-Do list is probably the size of K2 he's probably 
screwed too. :p

I wonder if it'd be easier just to hand-code wrappers using Pyrex, 
perhaps with a very basic macro system that automates only the 
simplest of tasks. A lower level automation that works well might 
ultimately be more productive than total automation that tends 
towards flakiness. While a single person wouldn't be able to wrap 
nearly as many APIs, the wrappers that did get done would probably be 
more reliable due to the extra attention; maybe a bit nicer to use 
too. Plus it'd make it easier for more folk to write these wrappers, 
taking some pressure off Jack.


Too bad :)  If you're writing Mac OS X specific code you 
**really** should have PyObjC anyway.
Oh, I have. It's all the casual users who don't that present the 
problem. If PyObjC is going to be so essential to all aspects of 
MacPython usage then it's really time for it to join the standard 
library.
So let's offer a package that includes appscript, PyObjC, and py2app 
in one installer.
I do recall Jack saying something about maybe having a smaller core 
library and moving a lot of the non-essential stuff to an external 
package that could be managed independently; kind of a 'second tier'. 
Perhaps that would be the way to do it: more flexibility for 
individual package developers since they're not tied to the official 
Python upgrade cycle while still providing a quick and simple 
one-stop installation for users. Even modules that are destined for 
the core library would benefit from spending some time at this 
halfway house first while all the kinks are worked out (e.g. OSA.so). 
Might be worth exploring to see what sort of infrastructure it would 
require to run.

HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Python 2.4 test_locale fails?

2005-02-28 Thread Jim Correia
On Sun, 27 Feb 2005 12:30:19 -0800, Brett C. <[EMAIL PROTECTED]> wrote:

> The bug is in Panther.  If you link anything against CoreFoundation it locks
> out changing the locale through locale.h in C which is what Python uses.

That's odd, but I can reproduce it with a short C program as you describe.

Thanks for the explanation. I'll sit tight and see what Tiger brings to the
table. Meanwhile this is hardly a showstopper for me putting 2.4 into use
for my purposes.

Thanks,
Jim
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread Nicholas Riley
On Mon, Feb 28, 2005 at 06:41:47PM +, has wrote:
> import Carbon.CF as CF
> f = 
> CF.CFURLCreateFromFileSystemRepresentation('file://localhost/Users/has/', 
> True)

That's not a filesystem representation (code for "UTF-8 encoded path").

> u'./file://localhost/Users/has' (Where did './' come from?)
> print f.toPython() # MacOS.Error: (-192, 'Resource not found')
> print f.CFURLGetFSRef() # crashes
> print f.CFURLGetFSRef()[1].as_pathname() # MacOS.Error: (-35, 'no such 
> volume')

When CF stuff crashes, you can often get more information by using the
debug version of frameworks:

% DYLD_IMAGE_SUFFIX="_debug" ipython
2005-02-28 15:34:18.928 python[16198] CFLog (0): Assertions enabled 
In [1]: import Carbon.CF as CF

In [2]: f = CF.CFURLCreateFromFileSystemRepresentation('/Users/nicholas', True)

In [3]: f.CFURLGetString().toPython()
2005-02-28 15:34:29.168 python[16198] CFLog (15): CFStringGetCharacters(): 
string range 0,32 out of bounds (length 31)
Out[3]: u'file://localhost/Users/nicholas'

In [4]: f.CFURLGetFSRef()
zsh: 16198 bus error  DYLD_IMAGE_SUFFIX="_debug" ipython
[...]

In [3]: f.CFURLGetFSRef()[1].as_pathname() 
DebugAssert: Third Party Client: err == 0  [-43] 
FSPathMakeRef_GetObjectInfoFailed [line 1670, file Files/HighLevelCalls.c]
DebugAssert: Third Party Client: volume != NULL FSMakePath_VolNotFound [line 
848, file Files/FilePathUtils.c]
DebugAssert: Third Party Client: (tempMapOffset <= (fileLength - 
kNullMapLength)) exit CheckMapHeaderCommon(), Resource Manager: EOF truncates 
resource map.[line 195, file Resources/Source/ResourceUtils.c]
---
Error Traceback (most recent call last)

/Users/nicholas/ 

Error: (-35, 'no such volume')

In [4]: f.CFURLGetFSRef()[1]  
DebugAssert: Third Party Client: err == 0  [-43] 
FSPathMakeRef_GetObjectInfoFailed [line 1670, file Files/HighLevelCalls.c]
Out[4]: 

In [5]: f = CF.CFURLCreateFromFileSystemRepresentation('/Users/nicholas/', True)
In [6]: f.CFURLGetFSRef()[1].as_pathname()
Out[6]: '/Users/nicholas'

It's hard to say if the crash is Python's fault or CF's fault, but
there's definitely a wrapper bug in there.  And it looks like you need
the trailing slash; didn't bother to check if that is by design or
not.

-- 
Nicholas Riley <[EMAIL PROTECTED]> | 
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread has
Bob wrote:
I'm not really up on these APIs nor their Python wrappers, but I 
suspect this stuff is broke:
[...]
Anyone want to confirm/correct me? (OS10.2.8, MacPython 2.3.3)
I wouldn't be surprised if it's broken,
Mmmm... encouraging.
(Hey: if bgen is so great, why won't it generate some damn test 
suites to prove it?;p)


use PyObjC and NSURL instead, those work.
Introduces a big fat third-party dependency though, something I'm 
trying to avoid here.


Why haven't you upgraded to 2.3.5 (not that I think it would help)?
I'm sure it's on my ToDo list somewhere .
has
--
http://freespace.virgin.net/hamish.sanderson/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread Bob Ippolito
On Feb 28, 2005, at 3:41 PM, has wrote:
Bob wrote:
I'm not really up on these APIs nor their Python wrappers, but I 
suspect this stuff is broke:
[...]
Anyone want to confirm/correct me? (OS10.2.8, MacPython 2.3.3)
I wouldn't be surprised if it's broken,
Mmmm... encouraging.
(Hey: if bgen is so great, why won't it generate some damn test suites 
to prove it?;p)
Well I can verify that there definitely are serious problems with CFURL 
after screwing around with it a bit.  I don't have time to chase bugs, 
though.

use PyObjC and NSURL instead, those work.
Introduces a big fat third-party dependency though, something I'm 
trying to avoid here.
Too bad :)  If you're writing Mac OS X specific code you **really** 
should have PyObjC anyway.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] CFURL Pain

2005-02-28 Thread Bob Ippolito
On Feb 28, 2005, at 1:41 PM, has wrote:
I'm not really up on these APIs nor their Python wrappers, but I  
suspect this stuff is broke:

First try:
import Carbon.CF as CF
f =  
CF.CFURLCreateFromFileSystemRepresentation('file://localhost/Users/ 
has/', True)
print f # 
print `f.CFURLGetString().toPython()` #  
u'./file://localhost/Users/has' (Where did './' come from?)
print f.toPython() # MacOS.Error: (-192, 'Resource not found')
print f.CFURLGetFSRef() # crashes
print f.CFURLGetFSRef()[1].as_pathname() # MacOS.Error: (-35, 'no such  
volume')

Second try:
import Carbon.CF as CF
f = CF.toCF('file://localhost/Users/has/').CFURLCreateWithString(None)
print f # 
print `f.CFURLGetString().toPython()` # u'file://localhost/Users/has/'
print f.toPython() # MacOS.Error: (-192, 'Resource not found')
print f.CFURLGetFSRef() # crashes
print f.CFURLGetFSRef()[1].as_pathname() # crashes
Anyone want to confirm/correct me? (OS10.2.8, MacPython 2.3.3)
I wouldn't be surprised if it's broken, use PyObjC and NSURL instead,  
those work.  Why haven't you upgraded to 2.3.5 (not that I think it  
would help)?

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] CFURL Pain

2005-02-28 Thread has
Hi folks,
I'm not really up on these APIs nor their Python wrappers, but I 
suspect this stuff is broke:

First try:
import Carbon.CF as CF
f = 
CF.CFURLCreateFromFileSystemRepresentation('file://localhost/Users/has/', 
True)
print f # 
print `f.CFURLGetString().toPython()` # 
u'./file://localhost/Users/has' (Where did './' come from?)
print f.toPython() # MacOS.Error: (-192, 'Resource not found')
print f.CFURLGetFSRef() # crashes
print f.CFURLGetFSRef()[1].as_pathname() # MacOS.Error: (-35, 'no such volume')

Second try:
import Carbon.CF as CF
f = CF.toCF('file://localhost/Users/has/').CFURLCreateWithString(None)
print f # 
print `f.CFURLGetString().toPython()` # u'file://localhost/Users/has/'
print f.toPython() # MacOS.Error: (-192, 'Resource not found')
print f.CFURLGetFSRef() # crashes
print f.CFURLGetFSRef()[1].as_pathname() # crashes
Anyone want to confirm/correct me? (OS10.2.8, MacPython 2.3.3)
has
--
http://freespace.virgin.net/hamish.sanderson/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Qualcomm Purevoice codec

2005-02-28 Thread Jack Jansen
On 22 Feb 2005, at 08:24, Roger Binns wrote:
Can anyone give me hints on how to access the Qualcomm Purevoice codec 
that is part of Quicktime from Python?

In BitPim we convert between wav and Purevoice using the convertor
that Qualcomm provides:
http://www.cdmatech.com/solutions/products/purevoice_download.jsp
Note that they don't supply it for MacOS X.  There is however a
codec inside Quicktime.  Ideally I want as close functionality
as possible as their Windows and Linux binaries.
[...]
I couldn't find anything relevant using Google.  There is a
Carbon.QT module but none of the methods appear to do any form of 
conversion.
The quicktime module for Python 2.4 has a lot of new functionality (and 
it's also available as an addon for Python 2.3, through my experimental 
database for Package Manager). Access to codecs is one of the things 
that has been added.

But, of course, I've only tested it very lightly and it's very possible 
I forgot some essential things. Could you please check whether Python 
2.4 (or its Carbon.Qt module used in 2.3) allows you to access the 
codec you need?
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] SciPy installer for Panther Python, anyone?

2005-02-28 Thread Just van Rossum
Peter Maxwell wrote:

> No guarantees, but my latest attempt to compile SciPy seems to have 
> worked:
> 
> http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip

Thanks. In the meantime, it turned out my problem was trivially solvable
through Numeric, so I can skip SciPy for now.

But it's great you made this available, I'm sure there are many others
who like to work with / play with SciPy but simply couldn't, before.

Just

(additional hints for google: OSX, 10.3, MacOSX, binary installer,
distribution)
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] SciPy installer for Panther Python, anyone?

2005-02-28 Thread Peter Maxwell
No guarantees, but my latest attempt to compile SciPy seems to have 
worked:

http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip
 -- Peter Maxwell
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig