[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame, images, and Macs



I know very little about Macs, but one thing I hear from experienced Python+Mac users is that you shouldn't really use the built-in Python for any of your own code. That should be left for system tools which use it, and you should install another copy of Python (either from Python.org, or Anaconda, or Homebrew/Macports) to run your code with.

On 9 January 2017 at 20:46, Bob Irving <bobirv@xxxxxxxxx> wrote:
Sorry for the confusion. Here's what happens sometimes:

About 3/4 of the image shows, then shows a colored or vertical line. Rest of image doesn't display.

We did a lot of searching about this, and it appears that Apple changed its Python image handling system in between 10.10 and 10.11. 

It makes sense.  But what we're wondering is if someone else has encountered this and knows a simple fix. The one thing that is recommended is to downgrade Python install, but we don't want to do that.

TIA,
Bob Irving


On Sat, Jan 7, 2017 at 2:00 PM, Charles Cossé <ccosse@xxxxxxxxx> wrote:
Yeah that's rather vague ... I'm on OSX 10.9.1 (forgot the name) and never had a problem ... what about running from cmd line to see any output?

On Sat, Jan 7, 2017 at 11:56 AM, Ian Mallett <ian@xxxxxxxxxxxxxx> wrote:
On Fri, Jan 6, 2017 at 8:16 AM, Bob Irving <bobirv@xxxxxxxxx> wrote:
We're using pygame in our CS classes here and have found that the built-in python (with Macs, which is what we use) works MOSTLY.

The big snag seems to be image files. It doesn't seem to matter whether they are jpgs, pngs, etc. They sometimes display and sometimes don't. 

Our suspicion is that it is something in how either El Cap or Sierra processes image files that conflicts with pygame....

Has anyone found a solution?

​I'm not sure I apprehend the problem. In particular, "[t]hey sometimes display and sometimes don't" could mean any number of different things, and could be due to an error in your display code, invalid image data, bugs in PyGame or OSX, &c. Please explain more about how exactly it doesn't work.
Ian​



--



--
Twitter: @birv2

Raspberry Pi Certified Educator