Popular recipes by Campbell Barton http://code.activestate.com/recipes/users/4168177/2010-10-28T12:03:52-07:00ActiveState Code RecipesWrite a PNG image in native Python (Python)
2010-10-28T12:03:52-07:00Campbell Bartonhttp://code.activestate.com/recipes/users/4168177/http://code.activestate.com/recipes/577443-write-a-png-image-in-native-python/
<p style="color: grey">
Python
recipe 577443
by <a href="/recipes/users/4168177/">Campbell Barton</a>
(<a href="/recipes/tags/alpha/">alpha</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/png/">png</a>, <a href="/recipes/tags/save/">save</a>).
</p>
<p>This is a simple PNG writing function, intended to be as small as possible.
It only supports RGBA 32bit PNGs and the input should be a buffer of rgba bytes.</p>
<p>Tested for python 2 and 3.</p>
Case insensitive filename on *nix systems - return the correct case filename (Python)
2008-11-25T16:27:13-08:00Campbell Bartonhttp://code.activestate.com/recipes/users/4168177/http://code.activestate.com/recipes/576571-case-insensitive-filename-on-nix-systems-return-th/
<p style="color: grey">
Python
recipe 576571
by <a href="/recipes/users/4168177/">Campbell Barton</a>
(<a href="/recipes/tags/case/">case</a>, <a href="/recipes/tags/case_insensitive/">case_insensitive</a>, <a href="/recipes/tags/convert/">convert</a>, <a href="/recipes/tags/filename/">filename</a>, <a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/sensitive/">sensitive</a>, <a href="/recipes/tags/windows/">windows</a>).
Revision 9.
</p>
<p>When dealing with windows paths on a *nix system sometimes youll need to resolve case insensitive paths. While using a fat filesystem or making everything lowercase would work.
this function means you can get python to take a case insensitive path and return the path with the correct case (if it exists).</p>