[Pythonmac-SIG] PyObjC - Apple sample code

2017-04-24 Thread Ben Byram-Wigfield
I’ve been looking at Apple’s Open Source website, where there is lots of python sample code. But the examples I’ve tried don’t work. They all flag syntax errors (usually about type conversion), or occasionally make the python process crash! Particularly, I’m looking at a script to parse the con

Re: [Pythonmac-SIG] PyObjC - Apple sample code

2017-04-27 Thread Ben Byram-Wigfield
File "/Users/Ben/Documents/Python Scripts/parse_page_contents.py", line 177, in createMyOperatorTable Quartz.CGPDFOperatorTableSetCallback(myTable, b"Do", myOperator_Do) ValueError: depythonifying 'pointer', got 'str' Ben > On 27 Apr 2017, at 08:53, Ronald Ouss

Re: [Pythonmac-SIG] PyObjC - Apple sample code

2017-04-28 Thread Ben Byram-Wigfield
attracted to creating ObjC python scripts was that they could run on any Mac. Thanks Ben > On 28 Apr 2017, at 08:07, Ronald Oussoren wrote: > > >> On 27 Apr 2017, at 10:17, Ben Byram-Wigfield wrote: >> >> I tried the repository browser there, and the version of >

Re: [Pythonmac-SIG] PyObjC - Apple sample code

2017-05-02 Thread Ben Byram-Wigfield
ndividual > scripts, it's probably best to figure out how to get those addressed with the > PyPA community. > > -glyph > > > On Apr 28, 2017, at 4:20 AM, Ben Byram-Wigfield > <mailto:ben...@me.com>> wrote: > > > > I ran the installer package f

Re: [Pythonmac-SIG] PyObjC - Apple sample code

2017-05-07 Thread Ben Byram-Wigfield
thonifying 'pointer', got 'bytes' I get different errors, depending on which one of the many versions of the script I download from the PyOBjC Apple open source depository. Thanks Ben > On 7 May 2017, at 09:01, Ronald Oussoren wrote: > >> >> On 2 May

[Pythonmac-SIG] Argument is a block, but no signature available

2018-03-16 Thread Ben Byram-Wigfield
I’m trying to use a Completion Handler block as an argument for a Cocoa AVMIDIPlayer method: midiPlayer = AVMIDIPlayer.alloc().initWithContentsOfURL_soundBankURL_error_(midiFile, None, None) midiPlayer.prepareToPlay() midiPlayer.play_(myCompletionHandler) But I get: Argument 2 is a block, but

[Pythonmac-SIG] PMPrinterPrintWithProvider

2019-01-23 Thread Ben Byram-Wigfield via Pythonmac-SIG
Hello I want to use some of the Printing APIs, but I’m having trouble finding them. Have things like PMPrinterPrintWithProvider, PMPrinterPrintWithFile, been implemented in PyObjC? I can’t find them in ApplicationServices, AppKit, Quartz or CoreFoundation modules. Thanks Ben _

[Pythonmac-SIG] Catalina issue

2019-10-29 Thread Ben Byram-Wigfield via Pythonmac-SIG
The following two lines work in Mojave, but flag an error in Catalina: >>> from AppKit import NSSavePanel >>> panel = NSSavePanel.savePanel() The error is: 2019-10-29 18:24:22.275 Python[6577:255233] *** Assertion failure in +[NSServiceViewController currentAppIsViewService], /BuildRoot/Librar

[Pythonmac-SIG] Supplying Unicode strings to pyobjc

2022-04-10 Thread Ben Byram-Wigfield via Pythonmac-SIG
ggling with this for years, and so stayed on python2 as long as possible. Thanks Ben Byram-Wigfield ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG