Search the Wiki

Viewing 1 to 10 of 16 items

Lists and Tuples

Two of the most commonly used built-in data types in Python are the list and the tuple. Lists and tuples are part of the group of sequence data types—in other words, lists and tuples store one or more objects or values in a specific order. The objects stored in a list or tuple can be  Full Article…

0

Dictionaries

Among the built-in Python data types is a very versatile type called a dictionary. Dictionaries are similar to lists and tuples because they act as storage units for other objects or variables you’ve created. Dictionaries are different from lists and tuples because the group of objects they hold aren’t in any particular order, but rather  Full Article…

0

Working with Threads in Python

What are threads? Simply put, try to imagine them as running several programs concurrently, in a single process. When you create one or more threads in your program, they get executed simultaneously, independent of each other, and most importantly, they can share information among them without any extra difficulty. These features make threads lightweight and  Full Article…

1

Working With Packages in Python

When you’ve got a large number of classes, you’ll want to organize them in packages. When the number of modules (simply stated, a module might be just a file containing some classes) in any project grows significantly, it is wiser to organize them in Packages – that is, placing functionally similar modules/classes in the same directory. Working with packages  Full Article…

1

Adding Watermarks to Images (Watermark Tutorial 1)

When you take photographs and post it onto the internet, it is advisable to add a watermark to prevent and discourage unauthorized copies or image theft. Below is a simple python script that uses the PIL image module. It adds a visible text watermark to the image using the system font. We start with importing  Full Article…

0

Setting Up the Python Environment with Virtualenv

Python is a very powerful scripting language. The language has lots of Python packages you can install and use in your projects. Sometimes, you may have different projects that need different versions of the same package/module. For example, let’s say you’re developing a Web application with the latest version of Django for a customer. At  Full Article…

1

Quick Yahoo Finance HTML scraper with BeautifulSoup

Python offers a lot of powerful and easy to use tools for automating data collection from the web.  In this example we’ll create a ‘web scraper’ to get data from a Yahoo Finance page about stock options. It’s alright if you don’t know anything about  stock options, the most important thing is that the website  Full Article…

1