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< 7 9 10 11 12 13 14 15 16 > Next
PYTHON & RUBY RAIL 12
Emacs

Python provides an editing mode for emacs, which will be automatically loaded if the following lines are present in the .emacs file.

(autoload 'python-mode "python-mode" "Python editing mode." t) (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist)) (setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist))
The NumPtr Module

Imagine that you have some Python code that needs to do some quick number crunching. After prototyping the algorithm in Python you find that it is far too slow for your purposes. To produce results faster you rewrite the algorithm in C. However, you would still like to have access to the data in Python as well. There are a number of reasons that you might need access to the data in both C and Python. Perhaps you need to generate the data in C and then simply access it in Python to format it and display in on a webpage or otherwise visualize the data. Perhaps you generate the dataset in Python and simply want to leverage C to get some of your calculations finished a bit faster.

Republish Dive Into Python
Want to mirror this web site? Publish this book on your corporate intranet? Distribute it on CD-ROM? Feel free. This book is published under the GNU Free Documentation License, which gives you enormous freedoms to modify and redistribute it in all its forms. If you're familiar with the GNU General Public License for software, you already understand these freedoms; the FDL is the GPL for books. You can read the license for all the details.
Lists

Lists are arbitrary collections of objects that can be nested. They are created by enclosing the comma separated items in square brackets. As strings they can be indexed and sliced, but as opposite to strings, it is also possible to modify them.

An Introduction to Python: Modules

Modules are essentially similar to header files in C, but not exactly, and modules are similar to libraries, but not exactly. All Python files only look like scripts until they are "imported" by another Python program. Importing allows you to include a Python script and all the functions and variables it contains inside of another script or program. Code reuse is one of the primary reasons for having Modules.

Modules also create namespaces, which may or may not mean something do you. Suffice it to lssay that modules create there own scope, kind of like global and local scope, or local and function scope.

Previous< 7 9 10 11 12 13 14 15 16 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.