Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

26 March, 2010

Running Django on Google App Engine.

Google App Engine and Django both have the ability to use the WSGI standard to run applications. As a result, it is possible to use nearly the entire Django stack on Google App Engine, including middleware.

Read the Doc. from....,


DjangoAppengine

06 March, 2010

Python Developer Center from Sun Microsystems,

Here's your connection for downloads, community, libraries, documents, and frameworks for developing web applications with Python and Jython.

Develop Web Applications With Python and Jython

Django | Snakes and Rubies downloads

Snakes and Rubies downloads

Ruby and Python developers from Chicago and vicinity gathered at DePaul University to hear two of the leaders in rapid Web-application development debate the merits of each other’s frameworks.

Adrian Holovaty, one of the creators of the Django framework for Python, and David Heinemeier Hansson, the creator of Ruby on Rails framework, answered questions about their work and the future of Web-application development. You can read more about the event at the Snakes and Rubies website.

SnakeandRubies

05 March, 2010

Onroute-courier and cargo

My first website,
The OnRoute-courier&Cargo website is fully powered by django.
This website is also written in Ruby and Python scripting languages and also available on Google-App-engine.
Thanks to Pavan Mishra,who help me to develop this website on Django.
Pavan also made this website on Ruby and Rails.which is hosted as onroute.in.
Here is some snaps of the Website..
powered by Django...developed by me

The home page of OnRoute


The Administration of consignment of OnRoute


Site Administration of OnRoute





see the original website of OnRoute-Courier and Cargo.

07 September, 2009

Python Tutorial

its a good?
he he he
kuch bhi......

http://www.poromenos.org/tutorials/python

02 August, 2009

Python Turtle For absolute Beginners....

PythonTurtle

A learning environment for Python suitable for beginners and children, inspired by Logo.



PythonTurtle aims to be the most low-threshold way for learning or teaching Python. The user is given command of an interactive Python shell, similar to IDLE, and is able to use Python functions to move a turtle that is displayed on the screen. An illustrated help screen demonstrates how to move the turtle and introduces the student to the basics of Python programming.

Are u know about SciPy...?

Scientific Tools for Python

SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!


check the url:-
http://www.scipy.org/

Python and Scientific Computing...

Python and Scientific Computing



Cookbook/OptimizationDemo1
SciPy optimization on Ubuntu Linux

NumPy and SciPy are two of many open-source packages for scientific computing that use the Python programming language. This website, together with other subdomains of the scipy.org domain, serves as a portal for all scientific computing with Python, not just NumPy and SciPy. The index under Topical Software in the navigation bar lists these domains and other destinations for scientific software using Python.


Good places to start to learn more about SciPy:

* More about NumPy / SciPy
* Index of Python packages for scientific computing
* Projects using NumPy / SciPy
* scikits add-on toolkits for numpy/scipy
* Download NumPy / SciPy
* Install SciPy
* Documentation
* Cookbook

29 July, 2009

Best website to learn Python.....

http://www.xmarks.com/site/docs.python.org/

Python 3.1 final was released on June 27th, 2009.

Python 3.1


Python 3.1 is a continuation of the work started by Python 3.0, the new backwards-incompatible series of Python. Improvements in this release include:

* An ordered dictionary type
* Various optimizations to the int type
* New unittest features including test skipping and new assert methods.
* A much faster io module
* Tile support for Tkinter
* A pure Python reference implementation of the import statement
* New syntax for nested with statements

Django 1.1 released.....

download Django from...

http://www.djangoproject.com/download/

25 June, 2009

Comparing Python to Other Languages

Python is often compared to other interpreted languages such as Java, JavaScript, Perl, Tcl, or Smalltalk. Comparisons to C++, Common Lisp and Scheme can also be enlightening. In this section I will briefly compare Python to each of these languages. These comparisons concentrate on language issues only. In practice, the choice of a programming language is often dictated by other real-world constraints such as cost, availability, training, and prior investment, or even emotional attachment. Since these aspects are highly variable, it seems a waste of time to consider them much for this comparison.

Java

Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python's built-in high-level data types and its dynamic typing. For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes.

For these reasons, Python is much better suited as a "glue" language, while Java is better characterized as a low-level implementation language. In fact, the two together make an excellent combination. Components can be developed in Java and combined to form applications in Python; Python can also be used to prototype components until their design can be "hardened" in a Java implementation. To support this type of development, a Python implementation written in Java is under development, which allows calling Python code from Java and vice versa. In this implementation, Python source code is translated to Java bytecode (with help from a run-time library to support Python's dynamic semantics).

Javascript

Python's "object-based" subset is roughly equivalent to JavaScript. Like JavaScript (and unlike Java), Python supports a programming style that uses simple functions and variables without engaging in class definitions. However, for JavaScript, that's all there is. Python, on the other hand, supports writing much larger programs and better code reuse through a true object-oriented programming style, where classes and inheritance play an important role.

Perl

Python and Perl come from a similar background (Unix scripting, which both have long outgrown), and sport many similar features, but have a different philosophy. Perl emphasizes support for common application-oriented tasks, e.g. by having built-in regular expressions, file scanning and report generating features. Python emphasizes support for common programming methodologies such as data structure design and object-oriented programming, and encourages programmers to write readable (and thus maintainable) code by providing an elegant but not overly cryptic notation. As a consequence, Python comes close to Perl but rarely beats it in its original application domain; however Python has an applicability well beyond Perl's niche.

Tcl

Like Python, Tcl is usable as an application extension language, as well as a stand-alone programming language. However, Tcl, which traditionally stores all data as strings, is weak on data structures, and executes typical code much slower than Python. Tcl also lacks features needed for writing large programs, such as modular namespaces. Thus, while a "typical" large application using Tcl usually contains Tcl extensions written in C or C++ that are specific to that application, an equivalent Python application can often be written in "pure Python". Of course, pure Python development is much quicker than having to write and debug a C or C++ component. It has been said that Tcl's one redeeming quality is the Tk toolkit. Python has adopted an interface to Tk as its standard GUI component library.

Tcl 8.0 addresses the speed issuse by providing a bytecode compiler with limited data type support, and adds namespaces. However, it is still a much more cumbersome programming language.

Smalltalk

Perhaps the biggest difference between Python and Smalltalk is Python's more "mainstream" syntax, which gives it a leg up on programmer training. Like Smalltalk, Python has dynamic typing and binding, and everything in Python is an object. However, Python distinguishes built-in object types from user-defined classes, and currently doesn't allow inheritance from built-in types. Smalltalk's standard library of collection data types is more refined, while Python's library has more facilities for dealing with Internet and WWW realities such as email, HTML and FTP.

Python has a different philosophy regarding the development environment and distribution of code. Where Smalltalk traditionally has a monolithic "system image" which comprises both the environment and the user's program, Python stores both standard modules and user modules in individual files which can easily be rearranged or distributed outside the system. One consequence is that there is more than one option for attaching a Graphical User Interface (GUI) to a Python program, since the GUI is not built into the system.

C++

Almost everything said for Java also applies for C++, just more so: where Python code is typically 3-5 times shorter than equivalent Java code, it is often 5-10 times shorter than equivalent C++ code! Anecdotal evidence suggests that one Python programmer can finish in two months what two C++ programmers can't complete in a year. Python shines as a glue language, used to combine components written in C++.

Common Lisp and Scheme

These languages are close to Python in their dynamic semantics, but so different in their approach to syntax that a comparison becomes almost a religious argument: is Lisp's lack of syntax an advantage or a disadvantage? It should be noted that Python has introspective capabilities similar to those of Lisp, and Python programs can construct and execute program fragments on the fly. Usually, real-world properties are decisive: Common Lisp is big (in every sense), and the Scheme world is fragmented between many incompatible versions, where Python has a single, free, compact implementation.


you see this essay on :-
www.python.org/doc/essays/comparisons.html

14 May, 2009

Java vs. Python Productivity

#################################################
JAVA:---------------

statically typed:>>>>>>>>>>>>>>>>>>

In Java, all variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception. That's what it means to say that Java is a statically typed language.

Java container objects (e.g. Vector and ArrayList) hold objects of the generic type Object, but cannot hold primitives such as int. To store an int in a Vector, you must first convert the int to an Integer. When you retrieve an object from a container, it doesn't remember its type, and must be explicitly cast to the desired type.

PYTHON:-----------

dynamically typed:>>>>>>>>>>>>>>>>>>>>>>

In Python, you never declare anything. An assignment statement binds a name to an object, and the object can be of any type. If a name is assigned to an object of one type, it may later be assigned to an object of a different type. That's what it means to say that Python is a dynamically typed language.

Python container objects (e.g. lists and dictionaries) can hold objects of any type, including numbers and lists. When you retrieve an object from a container, it remembers its type, so no casting is required.

#################################################
Example:>>>>>>>>>>>>>>>>>>

In the following example, we initialize an integer to zero, then convert it to a string, then check to see if it is empty. Note the data declaration (highlighted), which is necessary in Java but not in Python. Notice also how verbose Java is, even in an operation as basic as comparing two strings for equality.

JAVA:------------------

int myCounter = 0;
String myString = String.valueOf(myCounter);
if (myString.equals("0")) ...

// print the integers from 1 to 9
for (int i = 1; i < 10; i++) {
System.out.println(i);
}


PYTHON:----------------

myCounter = 0
myString = str(myCounter)
if myString == "0": ...

# print the integers from 1 to 9
for i in range(1,10):
print i

#################################################
EXAMPLE:>>>>>>>>>>>>


Your application has an Employee class. When an instance of Employee is created, the constructor may be passed one, two, or three arguments.

If you are programming in Java, this means that you write three constructors, with three different signatures. If you are programming in Python, you write only a single constructor, with default values for the optional arguments.

JAVA:------------

public class Employee
{
private String myEmployeeName;
private int myTaxDeductions = 1;
private String myMaritalStatus = "single";

//--------- constructor #1 -------------
public Employee(String EmployeName)
{
this(employeeName, 1);
}

//--------- constructor #2 -------------
public Employee(String EmployeName, int taxDeductions)
{
this(employeeName, taxDeductions, "single");
}

//--------- constructor #3 -------------
public Employee(String EmployeName,
int taxDeductions,
String maritalStatus)
{
this.employeeName = employeeName;
this.taxDeductions = taxDeductions;
this.maritalStatus = maritalStatus;
}
...


PYTHON:-------------

class Employee():

def __init__(self,
employeeName, taxDeductions=1, maritalStatus="single"):

self.employeeName = employeeName
self.taxDeductions = taxDeductions
self.maritalStatus = maritalStatus
...
#############
In Python, a class has only one constructor. The constructor method is simply another method of the class, but one that has a special name: __init__



#################################################

APPENDIX: About static vs. dynamic typing, and strong vs. weak typing, of programming languages.

JAVA:-----------

In a statically typed language, every variable name is bound both (1) to a type (at compile time, by means of a data declaration) and (2) to an object. The binding to an object is optional — if a name is not bound to an object, the name is said to be null. Once a variable name has been bound to a type (that is, declared) it can be bound (via an assignment statement) only to objects of that type; it cannot ever be bound to an object of a different type. An attempt to bind the name to an object of the wrong type will raise a type exception.



PYTHON:----------------

In a dynamically typed language, every variable name is (unless it is null) bound only to an object. Names are bound to objects at execution time by means of assignment statements, and it is possible to bind a name to objects of different types during the execution of the program.


#################################################
Email Me:-------- codes47@gmail.com

guess...????? About java and python

##########################################
JAVA:---------
statically typed:>>>>>>>>>>>>>>

The classic "Hello, world!" program illustrates the relative verbosity of Java.

In Java, all variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception. That's what it means to say that Java is a statically typed language.

Java container objects (e.g. Vector and ArrayList) hold objects of the generic type Object, but cannot hold primitives such as int. To store an int in a Vector, you must first convert the int to an Integer. When you retrieve an object from a container, it doesn't remember its type, and must be explicitly cast to the desired type.

PYTHON:--------

dynamically typed:>>>>>>>>>>>>>

In Python, you never declare anything. An assignment statement binds a name to an object, and the object can be of any type. If a name is assigned to an object of one type, it may later be assigned to an object of a different type. That's what it means to say that Python is a dynamically typed language.

Python container objects (e.g. lists and dictionaries) can hold objects of any type, including numbers and lists. When you retrieve an object from a container, it remembers its type, so no casting is required.

#########################################
JAVA:--------

verbose:>>>>>>>>>>>>>>
"abounding in words; using or containing more words than are necessary"

PYTHON:--------

concise (aka terse)>>>>>>>>>>>
"expressing much in a few words. Implies clean-cut brevity, attained by excision of the superfluous"
#########################################

JAVA:-----
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello, world!");
}
}


Python:----

print "Hello, world!"

&

print("Hello, world!") # Python version 3
##########################################
EXAMPLE:>>>>>>>>>>>>>>>>>>>>

In the following example, we initialize an integer to zero, then convert it to a string, then check to see if it is empty. Note the data declaration (highlighted), which is necessary in Java but not in Python. Notice also how verbose Java is, even in an operation as basic as comparing two strings for equality.

JAVA:---------

int myCounter = 0;
String myString = String.valueOf(myCounter);
if (myString.equals("0")) ...

// print the integers from 1 to 9
for (int i = 1; i < 10; i++) {
System.out.println(i);
}

PYTHON:----------

myCounter = 0
myString = str(myCounter)
if myString == "0": ...

# print the integers from 1 to 9
for i in range(1,10):
print i
#########################################
BEST EXAMPLE:>>>>>>>>>>>>>>>

Your application has an Employee class. When an instance of Employee is created, the constructor may be passed one, two, or three arguments.

If you are programming in Java, this means that you write three constructors, with three different signatures. If you are programming in Python, you write only a single constructor, with default values for the optional arguments.

JAVA:>>>>>>>
 
© 2009 Hitting codes Stealthily. All Rights Reserved | Powered by Blogger
Design by psdvibe | Bloggerized By LawnyDesigns