Somewhat new to Python. Trying out PyPNG (need to write some simple PNG files). Using the code (almost) exactly as in the examples in the documentation.
import png
def main():
f = open('ramp.png', 'wb') # binary mode is important
w = png.Writer(255, 1, greyscale=True)
w.write(f, [range(256)])
f.close()
if __name__ == "__main__":
main()
Tried running exactly as written in the documentation (without the main() additions).
When I run, I get the error:
AttributeError: 'module' object has no attribute 'Writer'
Google and SO offer nothing. Please help?