Re: [Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-07 Thread Kevin Walzer

On 6/6/12 10:12 AM, William R. Wing (Bill Wing) wrote:

But, it still leaves me wondering - why do wxPython and Tkinter need to look at 
stuff in the ScriptingAdditions area of the OS at all?


That one leaves me stumped. There is nothing in your code that appears 
to be calling Scripting Additions, so I'm not sure.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-06 Thread William R. Wing (Bill Wing)
On Jun 6, 2012, at 9:56 AM, Kevin Walzer wrote:

> On 6/5/12 10:36 PM, William R. Wing (Bill Wing) wrote:
>> But, to be sure I understand…  Is the reason I hadn't run into this problem 
>> earlier simply because Tk and wx need to check in with Apple Events so they 
>> can get things like mouse clicks, whereas more basic Python scripts don't?
> 
> If you post a copy of your code, it would be easier to figure out what's 
> going on.
> 
> -- 
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com

Probably not worth the bandwidth at this point, but here it is:

#!/usr/bin/env python

from Tkinter import *

class Application(Frame):
def say_hi(self):
print "hi there, everyone!"

def createWidgets(self):
self.QUIT = Button(self)
self.QUIT["text"] = "QUIT"
self.QUIT["fg"]   = "red"
self.QUIT["command"] =  self.quit

self.QUIT.pack({"side": "left"})

self.hi_there = Button(self)
self.hi_there["text"] = "Hello",
self.hi_there["command"] = self.say_hi

self.hi_there.pack({"side": "left"})

def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()

root = Tk()
app = Application(master=root)
app.mainloop()
root.destroy()



That code was copied straight out of the Tk documentation at:
  http://docs.python.org/library/tk.html
and it triggered the error caused by the 32-bit Adobe file in 
/ScriptingAdditions/ that I'd never seen before.

It turns out that Adobe has posted a 64-bit version of the file, although it 
takes a fair amount of work in a terminal session to get it, set its 
permissions, ownership, and ACL all properly.
But, it still leaves me wondering - why do wxPython and Tkinter need to look at 
stuff in the ScriptingAdditions area of the OS at all?

Thanks for your patience,
Bill
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-06 Thread Kevin Walzer

On 6/5/12 10:36 PM, William R. Wing (Bill Wing) wrote:

But, to be sure I understand…  Is the reason I hadn't run into this problem 
earlier simply because Tk and wx need to check in with Apple Events so they can 
get things like mouse clicks, whereas more basic Python scripts don't?


If you post a copy of your code, it would be easier to figure out what's 
going on.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-05 Thread William R. Wing (Bill Wing)
On Jun 5, 2012, at 9:57 PM, Kevin Walzer wrote:

> On 6/5/12 8:43 PM, William R. Wing (Bill Wing) wrote:
>> /Library/ScriptingAdditions/Adobe Unit Types.osax
> 
> This osax is conflicting not with Python or Tk, but with the Apple Events 
> framework. It's probably PPC or 32-bit only. An updater is available from 
> Adobe. (I've run into this issue with my own apps, which crash when someone 
> has an outdated osax installed--there's no workaround other than to ask the 
> end user to remove or update the library.)
> -- 
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com

Thanks, when your note showed up, I had just finished hiding the Adobe .osax 
file (I finally did find a clue on Google) and discovered that the error msg 
had gone away.

But, to be sure I understand…  Is the reason I hadn't run into this problem 
earlier simply because Tk and wx need to check in with Apple Events so they can 
get things like mouse clicks, whereas more basic Python scripts don't?

That's terrible syntax, but maybe you can see what I'm asking.  I've been 
writing Python scripts for a year or so, and this is the first I've seen of 
this problem.

Thanks,
Bill

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


Re: [Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-05 Thread Kevin Walzer

On 6/5/12 8:43 PM, William R. Wing (Bill Wing) wrote:

/Library/ScriptingAdditions/Adobe Unit Types.osax


This osax is conflicting not with Python or Tk, but with the Apple 
Events framework. It's probably PPC or 32-bit only. An updater is 
available from Adobe. (I've run into this issue with my own apps, which 
crash when someone has an outdated osax installed--there's no workaround 
other than to ask the end user to remove or update the library.)

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] Problems with /Library/ScriptingAdditions/Adobe Unit Types.osax

2012-06-05 Thread William R. Wing (Bill Wing)
Hope someone here can help with a work-around.

Context:  OS-X 10.7.4 (Lion), Python 2.7.3 (downloaded from Python.org and 
installed in /Library/Frameworks... (not /System/Library), and seems to work 
just file.

However, when I attempt to run any sort of GUI code (either a Tk demo from the 
Python docs page or a wxPython demo), I get the following error msg:

StraylightPro:Python wrw$ python tk_test.py
2012-06-05 20:28:35.442 Python[51697:f07] Error loading 
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit 
Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit 
Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did 
find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe 
Unit Types: no matching architecture in universal wrapper
Python: OpenScripting.framework - scripting addition 
"/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable 
handlers.

When I first hit this, I was running wxPython2.8 which is based on the Carbon 
widgets and thus has to run in 32-bit mode.  I assumed I was seeing an 
architecture collision, so downloaded wxPython2.9 Cocoa, which should be 64-bit 
compatible.  Same error.  After scratching my head and checking with Google 
(which knows about this error in conjunction with Adobe CS products but knows 
nothing about Python), I decided to try a Tk demo, assuming that since the Tk 
library is bundled with Python, it would be good to go.  I got the same 
identical error again, and in fact (as you can see) the fragment of the 
terminal session pasted in above was from the Tk test.

Color me frustrated.  Any help appreciated.

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