Python Programming
Follow
Find
1.7K views | +1 today
Python Programming
Articles and resources on Python
Curated by Amanda Simmons
Your new post is loading...
Scooped by Amanda Simmons
Scoop.it!

Introduction to Python Classes | Python Central - Python Programming Examples, Tutorials

Introduction to Python Classes | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

Classes are a way of grouping related bits of information together into a single unit (also known as an object), along with functions that can be called to manipulate that object (also known as methods). For example, if you want to track information about a person, you might want to record their name, address and phone number, and be able to manipulate all of these as a single unit.

Python has a slightly idiosyncratic way of handling classes, so even if you’re familiar with object-oriented languages like C++ or Java, it’s still worth digging into Python classes since there are a few things that are different.

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

How to Use the Twython Python library | Python Central - Python Programming Examples, Tutorials

How to Use the Twython Python library | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

Python is a very versatile language with a very diverse library ecosystem. That’s why their motto is “batteries included” – and boy are they right! Using Python, you can connect and interact with a wide array of social networks including Facebook, Twitter and LinkedIn.

Today, I want to show you how to perform some basic tasks on Twitter using Twython and Python.

Twython is a very robust, mature library for Twitter. It has been maintained for over 2 years. It’s actively maintained by its core team and receives patches from the community very regularly. This is not an alpha-status library; it’s tested and used in many commercial applications.

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Python on AWS with boto | Python Central - Python Programming Examples, Tutorials

Python on AWS with boto | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it


Amazon Web Services offer us all cheap, ready access to serious cloud computing infrastructure. So how do we run Python on it?

Setting up Python on EC2

EC2 is Amazon’s Elastic Compute Cloud. It’s the service used to create and operate virtual machines on AWS. You can interact with these machines using SSH, but it’s much nicer to use the IPython HTML Notebook set up as a web app.

Click on the link to read more... 

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Real-World Regular Expressions for Python | Python Central - Python Programming Examples, Tutorials

Real-World Regular Expressions for Python | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

We’ve covered a lot of ground in this series of articles, so let’s now put it all together and work through a real-life application.

A common task is to parse a Windows INI file, which are key/value pairs, separated into sections, something like this:

Click on the link above to read more... 

more...
No comment yet.
Suggested by Johi
Scoop.it!

Learn Python The Hard Way

A great set of books and courses helping you learn coding in Python!
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

The Odds & Ends of Python Regular Expressions

The Odds & Ends of Python Regular Expressions | Python Programming | Scoop.it
In the first two parts of this series, we looked at some fairly advanced usage of regular expressions.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

More About Python Regular Expressions

More About Python Regular Expressions | Python Programming | Scoop.it
In the first part of this series, we looked at the basic syntax of regular expressions and some simple examples. In this part, we'll take a look at some more advanced syntax and a few of the other features Python has to offer.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

How to Traverse a Directory Tree

How to Traverse a Directory Tree | Python Programming | Scoop.it

When you use a scripting language like Python, one thing you will find yourself doing over and over again is walking a directory tree, processing files. While there are many ways to do this, Python offers a built-in function that makes this process a breeze.

Here’s a really simple example that walks a directory tree, printing out the name of each directory and the files contained:

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Encoding and Decoding Strings (in Python 2.x)

Encoding and Decoding Strings (in Python 2.x) | Python Programming | Scoop.it
Python Programming Examples, Tutorials...

...

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

How to check if a string is a number in Python

How to check if a string is a number in Python | Python Programming | Scoop.it
Sometimes you want to validate user input to check if a string is a number. Using this simple function, you can check very easily!
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

How to execute a Python program through a file or the shell

How to execute a Python program through a file or the shell | Python Programming | Scoop.it
If you can’t execute or run a program then programming is pointless.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Batch image re-sizing and processing with Python

Batch image re-sizing and processing with Python | Python Programming | Scoop.it
Python is a very powerful scripting language and you will be pleasantly surprised to find that a lot of the common functions you would want to build are available to you in library form.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Recursive Directory Traversal in Python: Make a list of your movies!

Recursive Directory Traversal in Python: Make a list of your movies! | Python Programming | Scoop.it
What's better than making a list of video files in your hard disc drive? Let's make a list of all video files in a folder, and all other folders in it.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Using the Python Tempfile Module | Python Central - Python Programming Examples, Tutorials

Using the Python Tempfile Module | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

While programming in Python, there will likely be times where you have some data that needs to be utilized or manipulated in the form of a file but hasn’t yet been written to one. Naturally, the first solution that comes to mind is to open a new or existing file, write the data and finally save it (if you’re unfamiliar with how to do this take a look at the article Reading and Writing Files in Python). However, it might also be the case that once your script(s) are finished running, you don’t need or want the file(s) anymore, and therefore, don’t want it hanging around in your or anyone else’s file system.

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

List Comprehension in Python | Python Central - Python Programming Examples, Tutorials

List Comprehension in Python | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

Sometimes we need to generate lists which follow some natural logic, such as iterating over a sequence and applying some conditions in them. We can use Python’s “list comprehension” technique to write compact codes to generate lists. We can loop through a sequence, and apply logical expression.

First, let’s look at a special function range – it’s used to generate a list of numbers over a range as the name suggests! Try the following code section in the Python IDLE:

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Programming Computer Vision with Python (2012) » Nulled Scripts,Full Nulled PHP Scripts download for webmasters,wordpress joomla templates

Programming Computer Vision with Python (2012) » Nulled Scripts,Full Nulled PHP Scripts download for webmasters,wordpress joomla templates | Python Programming | Scoop.it
Programming Computer Vision with Python | 2012 | Pages: 272 | PDF | 62Mb INFO Uploaded by pm1 Leitbit (Fast download Recommended) Mirror (Programming Computer Vision with Python (2012): http://t.co/WViSdRmx...)...
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Introduction to Tkinter (Python) | Python Central - Python Programming Examples, Tutorials

Introduction to Tkinter (Python) | Python Central - Python Programming Examples, Tutorials | Python Programming | Scoop.it

At some point in your Python experience, you might want to create a program with a graphical user interface or GUI (pronounced “gooey” by most). Many toolkits for Python exist to accomplish this, including Python’s own native GUI library, Tkinter. Setting up GUIs in Tkinter isn’t complicated, though in the end it depends on the complexity of your own design. Here we will look at of the commonly used parts of the Tkinter module through some simple GUI examples. Before getting into the examples, let’s briefly cover the commonly used widgets (building blocks of the GUI) the Tkinter library has to offer.

In a nutshell all of Tkinter’s widgets provide either simple input (user-input) to the GUI, output (graphical display of information) from the GUI, or a combination of the two. The following are two tables of the most commonly used widgets for input and output with brief descriptions.

more...
No comment yet.
Suggested by Katia Frolova
Scoop.it!

Python resources for beginners

Python resources for beginners | Python Programming | Scoop.it

Learn Python with these free online resources and tutorials.

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Introduction to Python Regular Expressions

Introduction to Python Regular Expressions | Python Programming | Scoop.it
Searching within a string for another string is pretty easy in Python: This is fine if we know exactly what we’re looking for, but what if we’re looking...
more...
Amanda Simmons's comment, July 1, 2012 8:02 AM
Thanks Katia...Keep in touch :-)
Scooped by Amanda Simmons
Scoop.it!

Fun With Python Function Parameters

Fun With Python Function Parameters | Python Programming | Scoop.it
Virtually every programming language has functions and procedures, a way of separating out a block of code that can be called many times from different places in your program, and a way to pass parameters into them.
more...
Amanda Simmons's comment, July 1, 2012 8:00 AM
Thanks for the share Johi :-)
Scooped by Amanda Simmons
Scoop.it!

Reading and Writing Files in Python

Reading and Writing Files in Python | Python Programming | Scoop.it

Manipulating files is an essential aspect of scripting in Python, and luckily for us, the process isn’t complicated. The built-in open() function is the preferred method for reading files of any type, and probably all you’ll ever need to use. Let’s first demonstrate how to use this method on a simple text file.

For clarity, let’s first write our text file string in a standard text editor (MS Notepad in this example).  When opened in the editor it will look like this (note the empty trailing line):

more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

The best Python IDE’s you can use for development

The best Python IDE’s you can use for development | Python Programming | Scoop.it
An IDE (Integrated Development Environment) is one of the best tools a programmer can wield.
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

The Object Oriented Paradigm

The Object Oriented Paradigm | Python Programming | Scoop.it
Object orientation is a central concept in Python, as well as many other languages.
more...
Amanda Simmons's comment, July 1, 2012 7:56 AM
Thanks for the share, Denny :-)
Scooped by Amanda Simmons
Scoop.it!

How to install Python 2.7 on Windows 7. ‘python’ is not recognized as an internal or external command.

How to install Python 2.7 on Windows 7. ‘python’ is not recognized as an internal or external command. | Python Programming | Scoop.it
It seems this problem is more common than we’d like to admit to ourselves, but the solution is quite simple!
more...
No comment yet.
Scooped by Amanda Simmons
Scoop.it!

Setting Up the Python Environment with Virtualenv

Setting Up the Python Environment with Virtualenv | Python Programming | Scoop.it
Python is a very powerful scripting language. The language has lots of Python packages you can install and use in your projects.
more...
No comment yet.