Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
Previous< 1 2 3 4 5 6 > Next
PYTHON & RUBY RAIL 2
Using the Python Interpreter

The Python interpreter is usually installed as /usr/local/bin/python on those machines where it is available; putting /usr/local/bin in your Unix shell's search path makes it possible to start it by typing the command

python

to the shell. Since the choice of the directory where the interpreter lives is an installation option, other places are possible; check with your local Python guru or system administrator. (E.g., /usr/local/python is a popular alternative location.)

Python Generators - What are they

Generators are a cool Python feature that was introduced back in Python 2.2 (as a __future__ import) and became standard in Python 2.3. They are a very neat abstraction that allows you to simplify control flow and in many instances the resulting elegance also leads to much lower memory consumption.

The key to generator functionality lies in the yield keyword. A very simple example of how it works is demonstrated below:

Programs in a file, and variables

Well, we can make one-liner programs. So What? You want to send programs to other people, so that they can use them, without knowing how to write them.

Editing in Notepad

Writing programs in python to a file is VERY easy. Python programs are simply text documents - you can open them up in notepad, and have a look at them, just like that. So, go and open notepad. Type the following:

How to Make Your Own Python Program

Even though the IDLE shell is pretty neat, and very useful for figuring out whether a code idea will work, it's not any good for actual programs.

Don't get all huffy. I said the IDLE shell wasn't good for programs, not that IDLE is no good for programs.

To edit a Python script in IDLE, simply go to the "File" menu and select "New Window". This will open a new window for editing Python stuff. Not a shell, but a NotePad-like text editing environment.

Basic Python Data Types

When programming you have the control. The computer is going to do what you tell it to do. If the program doesn't work it will continue to not work every time you run it until you fix it. This is the consistency of programming. Programming copes with changes and you can easily change programs to do something else

Previous< 1 2 3 4 5 6 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.