Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the "png" module? #2

Open
xandark opened this issue Jul 29, 2015 · 3 comments
Open

Where is the "png" module? #2

xandark opened this issue Jul 29, 2015 · 3 comments

Comments

@xandark
Copy link

xandark commented Jul 29, 2015

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
Copy link
Owner

option8 commented Jul 29, 2015

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.
[email protected] | http://www.option8consulting.com
mobile: 919.368.7167
On Jul 29, 2015 6:26 AM, "xandark" [email protected] 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
#2.

@xandark
Copy link
Author

xandark commented Jul 30, 2015

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
Copy link
Author

xandark commented Aug 14, 2015

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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants