[wingide-users] OSX clipboard problems - import problems in WingIDE scripts

Stephan Deibel sdeibel at wingware.com
Sun May 31 14:26:31 MDT 2009

Roberto Lupi wrote:
> Hi,
> I just bought WingIDE Professional a couple  of days ago. I have a 
> serious problem with the clipboard not working between the Cocoa/OSX 
> world and the X11 world and I want to solve it as far as WingIDE is 
> concerned. Otherwise the IDE would be almost useless to me :-(
> OSX includes two commands, pbcopy and pbpaste, that respectively set 
> and get the cocoa clipboard. Try:
> date | pbcopy
> pbpaste
> An alternative, is to use Python's Cocoa bindings to read the OSX 
> clipboard:
> from Cocoa import NSPasteboard, NSStringPboardType
> def get_osx_clipboard():
>     return 
> NSPasteboard.generalPasteboard().stringForType_(NSStringPboardType)
> I tried both ways, but I cannot import commands or Cocoa succesfully.
> If I manually insert the python library path to sys.path, I can import 
> commands but getoutput fails with an IOError (interrupted syscall). If 
> I do it with Cocoa, it won't import the module at all.
> You'll find my script as an attachment.
> Can anyone help?

Try installing the latest XQuartz.  This will probably solve the 
problem.  If not,
please let us know.



More information about the wingide-users mailing list