Why Python Pickle is Insecure

Python pickle is a powerful serialization module. It is the most common method to serialize and deserialize Python object structures. The pickle module has an optimized cousin called cPickle that is written in C. In this article I'm going to refer to both modules by the name pickle unless I mention otherwise. The security issues I'm going to discuss apply to both of them. I'm going to show how unpickling can be exploited to execute arbitrary commands on your machine Read more

PIL Tutorial: From Basic to Advanced Drawing

The ImageDraw module provides simple 2D graphics for Image objects. You can use it to create new images, annotate or retouch existing images, and generate graphics on the fly for usage on the web. In this tutorial I'm going to show you how to use this module to draw 2D graphics. I'll start with basic shapes and then move on to fairly complicated ones. Read more

Animated Terminal Progress Bar in Python

In my previous article python terminal controller, I explained a simple way to control display in the terminal and print in colors. In this article I'm going to use the terminal module to draw a fancy animated progress bar. Read more

progressbar

Terminal Controller for Python

I was looking for an easy way to control the terminal and print colored text in Python. I found this useful recipe. But I wanted something simpler yet powerful, so I decided to write my own little terminal controller. Read more

PIL Tutorial: Converting Between PNG and GIF

PIL supports both PNG and GIF image formats, but converting between the two while keeping transparency can be tricky. Inside is a list of tips for dealing with transparency and dithering issues when processing GIF image formats in PIL. If you are only interested in the final solution you can skip this tutorial and go directly to the code Read more

PIL Tutorial: How to Create a Button Generator

Python Imaging Library (PIL) is an external library for Python. It supports opening, manipulating, and saving different image file formats. PIL is well documented and easy to install.

In this tutorial I'm focusing on the paste function. At the end of the tutorial, I'll explain a useful script that converts any icon into a web 2.0 style button, just like these: Read more

delicious button feed button blogger button

jQuery Confirm Plugin

This plugin displays a confirmation message in place before doing an action. It does not require adding any extra code apart from a call to the plugin itself. One call to $(element).confirm() will do the magic. Also, this plugin doesn't require you to provide a callback function; it figures it out on its own.
You can check the examples for more info. Read more

Syndicate content