Python
Python is an interpreted programming language created by Guido van Rossum in 1990. Python is fully dynamically typed and uses automatic memory management; it is thus similar to Perl, Ruby, Scheme, Smalltalk, and Tcl. Python is developed as an open source project, managed by the non-profit Python Software Foundation, and is available for free. Python 2.5.2a was released on April 27, 2006. Python is a multi-paradigm language. This means that, rather than forcing coders to adopt one particular style of coding, it permits several. Object orientation, structured programming, functional programming, and aspect-oriented programming are all supported. Other paradigms can be supported through extensions, such as pyDBC and Contracts for Python which allow Design by Contract. Python is dynamically type-checked and uses garbage collection for memory management. An important feature of Python is dynamic name resolution, which binds method and variable names during program execution.
Categories in section: Articles Reviews
User rating: Rate it first |
Hits: 413
I’ve been playing around with Python a bit lately for a new project. I got up to a stage where I needed image manipulation on a per-pixel level. Here’s a few different approaches I tried out, with performance results and code snippets.
User rating: Rate it first |
Hits: 299
Here’s a method to run Python CGI scripts locally, for testing. It employs the BaseHTTPServer and CGIHTTPServer standard modules to run a simple CGI-capable web server on your computer.
Here’s the code implementing the server:
User rating: Rate it first |
Hits: 831
This module provides immutable UUID objects (the UUID class) and the functions uuid1(),
uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() or uuid4(). Note that uuid1() may compromise privacy since it creates a UUID containing the computer's network address. uuid4() creates a random UUID.
Saturday, 09 June 2007 |
Written by
Adi Bach
|
User rating: Rate it first |
Hits: 2451
Python is an interpreted, high-level programming language, pure object-oriented, and powerful server-side scripting language for the Web. Like all scripting languages, Python code resembles pseudo code. Its syntax's rules and elegant design make it readable even among multiprogrammer development teams.
Tuesday, 20 March 2007 |
Written by
Adi Bach
|
User rating: Rate it first |
Hits: 2554
In this chapter, you will learn how to use Python to work with numbers. You’ve already seen some arithmetic examples, but after reading this chapter, you’ll have a better understanding of the different ways you can represent numbers in Python, of how to perform mathematical computations, and of efficient ways of working with large numerical data sets.
User rating: Rate it first |
Hits: 1617
{mos_sb_discuss:36} Python scripts don't run in a vacuum. Depending on platforms and startup procedures, Python programs may have all sorts of enclosing context; information automatically passed in to the program by the operating system when the program starts up. For instance, scripts have access to the following sorts of system-level inputs and interfaces:
User rating: Rate it first |
Hits: 7943
The notion of the current working directory (CWD) turns out to be a key concept in some scripts' execution: it's always the implicit place where files processed by the script are assumed to reside unless their names have absolute directory paths. The os.getcwd lets a script fetch the CWD name explicitly, and os.chdir allows a script to move to a new CWD.
User rating: Rate it first |
Hits: 1376
{mos_sb_discuss:36}
To be fair again, some tasks are outside of Python's scope.
Like all dynamic interpreted languages, Python, as currently implemented, isn't
generally as fast or efficient as static, compiled languages such as C (see the article, "How Python Runs Your
Code,"). At least when nontypical benchmarks are
compared line for line, Python code runs more slowly than C code.
Thursday, 22 February 2007 |
Written by
JOHN
|
User rating: Rate it first |
Hits: 1240
{mos_sb_discuss:36}
User rating: Rate it first |
Hits: 1151
{mos_sb_discuss:36}
Today, Python is "interpreted" in the same way Java is: Python source code is
automatically compiled (translated) to an intermediate and platform-neutral form
called bytecode, which is then executed by the Python virtual machine (that is,
the Python runtime system).
Powered by jReviews
|
|
|
Who's Online |
|
We have 4 guests online |
|