option8 / RetroConnector

RetroConnector series of open source adapter boards for Apple || series computers.
71 stars 18 forks source link

Where is the "png" module? #2

Open xandark opened 9 years ago

xandark commented 9 years ago

This is a cool script, but running it on my Kubuntu Linux machine, I get this:

$ python DSK-Image.py ../Images\ II/Aztec.dsk Traceback (most recent call last): File "DSK-Image.py", line 11, in import png # PNG image library ImportError: No module named png

I tried to pip install png, but that came up with no matches. Where is this png.py module? Could be included in this project?

option8 commented 9 years ago

The links are in the comments of the .py file:

requires ImageMagick: http://www.imagemagick.org/

and python PNG module: https://pypi.python.org/pypi/pypng

I'll add those to the readme.

Charles Mangin Option8, LLC - Making Macs happy since 1999. option8@option8.com | http://www.option8consulting.com mobile: 919.368.7167 On Jul 29, 2015 6:26 AM, "xandark" notifications@github.com wrote:

This is a cool script, but running it on my Kubuntu Linux machine, I get this:

$ python DSK-Image.py ../Images\ II/Aztec.dsk Traceback (most recent call last): File "DSK-Image.py", line 11, in import png # PNG image library ImportError: No module named png

I tried to pip install png, but that came up with no matches. Where is this png.py module? Could be included in this project?

— Reply to this email directly or view it on GitHub https://github.com/option8/RetroConnector/issues/2.

xandark commented 9 years ago

Oops, missed that in the source O_o

I liked the fail-overs you implemented (the try/except/finally's) and that could be extended to this case:

try:
    import png              # PNG image library
except:
    print("This requires the python PNG module: https://pypi.python.org/pypi/pypng (or: pip install pypng)")
    sys.exit(0)
xandark commented 9 years ago

I've added these canges so that the script will give better feedback if pypng hasn't been installed. It's in this pull request:

DSK-Image.py : Added compatibility with Linux and Windows in addition to OSX. #4

Plus gave it the ability to work under Windows and Linux, woohoo! :)