Spread Firefox Affiliate Button

Friday, February 25, 2011

Python

#/usr/bin/python
""" Global Declaration of List for Student name and Roll No"""
name = [] #list declaration
rollno = []

""" Getting user input """

u_input_no = input ("Enter the number of input:")

#Starting the function get() to get the student details from the user

def get():
s_name = raw_input("Enter The Name:") # Getting the student Name
name.append(s_name) # add it to the name list
s_roll_no = input ("Enter the Roll number:") # Getting the Student roll number
rollno.append(s_roll_no) # Adding it to roll number list
# Starting the fuction display() to display the inputs stored in the list

def display():
for x in range(u_input_no): # for loop started to display the name and roll number 1/1
print "Name: ",name[x]
print "Roll No:",rollno[x]

for i in range(u_input_no):
get()
else:
display()

Friday, April 30, 2010

Wing IDE 3.2.6

Wingware has released version 3.2.6 of Wing IDE, an integrated development
environment designed specifically for the Python programming language.

This release includes the following minor features and improvements:

* Added Copy to Clipboard in Source Assistant
* Added ability to clear Python Shell during a session
* Added Duplicate Line Above line editing command
* Several vi mode fixes (see CHANGELOG.txt for details)
* Fixed failure to close files when switching projects
* Fixed fragmentation of completion lists in html files
* Fixed edit of "Include Hidden and Temporary Files" project directory property
* Many other minor features and bug fixes; See the change log
at http://wingware.com/pub/wingide/3.2.6/CHANGELOG.txt for details

*Wing 3.2 Highlights*

Versions 3.2.x of Wing IDE include the following new features not present
in version 3.1:

* Support for Python 3.0 and 3.1
* Rewritten version control integration with support for Subversion, CVS,
Bazaar, git, Mercurial, and Perforce (*)
* Added 64-bit Debian, RPM, and tar file installers for Linux
* File management in Project view (**)
* Auto-completion in the editor obtains completion data from live runtime
when the debugger is active (**)
* Perspectives: Create and save named GUI layouts and optionally automatically
transition when debugging is started (*)
* Improved support for Cython and Pyrex (*.pyx files)
* Added key binding documentation to the manual
* Added Restart Debugging item in Debug menu and tool bar (**)
* Improved OS Commands and Bookmarks tools (*)
* Support for debugging 64-bit Python on OS X

(*)'d items are available in Wing IDE Professional only.
(**)'d items are available in Wing IDE Personal and Professional only.

The release also contains many other minor features and bug fixes; see the
change log for details: http://wingware.com/pub/wingide/3.2.6/CHANGELOG.txt

*Downloads*

Wing IDE Professional and Wing IDE Personal are commercial software and
require a license to run. A free trial license can be obtained directly from
the product when launched. Wing IDE 101 can be used free of charge.

Wing IDE Pro 3.2.6 Wing IDE Pro 3.2.6

Wing IDE Personal 3.2.6 Wing IDE Personal 3.2.6

Wing IDE 101 3.2.6 Wing IDE 101 3.2.6

*About Wing IDE*

Wing IDE is an integrated development environment for the Python programming
language. It provides powerful debugging, editing, code intelligence,
testing, version control, and search capabilities that reduce development and
debugging time, cut down on coding errors, and make it easier to understand
and navigate Python code.

Wing IDE is available in three product levels: Wing IDE Professional is
the full-featured Python IDE, Wing IDE Personal offers a reduced feature
set at a low price, and Wing IDE 101 is a free simplified version designed
for teaching entry level programming courses with Python.

System requirements are Windows 2000 or later, OS X 10.3.9 or later for PPC or
Intel (requires X11 Server), or a recent Linux system (either 32 or 64 bit).
Wing IDE 3.2 supports Python versions 2.0.x through 3.1.x.

*Purchasing and Upgrading*

Wing 3.2 is a free upgrade for all Wing IDE 3.0 and 3.1 users. Version 2.x
licenses cost 1/2 the normal price to upgrade.

Upgrade a 2.x license: upgrade

Purchase a 3.x license: purchase

--

The Wingware Team
Wingware | Python IDE
Advancing Software Development

www.wingware.com

Wednesday, April 21, 2010

Python-URL! - weekly Python news and links (Mar 17)

Hi.. Python Weekly news and links from Python-mailing list

Making operations in the Fraction class automatically return a
subclass
instance when called with subclass arguments:
http://groups.google.com/group/comp.lang.python/t/2512697a901d4752/

Providing alternate constructors for an existing class:
http://groups.google.com/group/comp.lang.python/t/99e87afb58f3ef3d/

Checking existence of files matching a certain pattern:
http://groups.google.com/group/comp.lang.python/t/a95183b7ae931b7a/

How to gracefully exit the current process, when there are multiple
threads, on Windows:
http://groups.google.com/group/comp.lang.python/t/5a6a7bcfd30fb7ce/

How inspect.stack()/sys._getframe() interact with local variables
and
references:
http://groups.google.com/group/comp.lang.python/t/fc8bf697fa9a01a4/

Alternatives to the re module when looking for a large set of
constant
strings:
http://groups.google.com/group/comp.lang.python/t/63e6e177be7dea21/

Why does Python syntax allow "break" from no more than a single
loop
at one time?
http://groups.google.com/group/comp.lang.python/t/96f3407480ed39ab/

Trying to start a new Python meeting group is not easy:
http://groups.google.com/group/comp.lang.python/t/a24bf882c72c555/

Bad interactions between cmd.exe code page (Windows), Popen, and
the
UTF-8 encoding:
http://groups.google.com/group/comp.lang.python/t/2da1f1de573e5663/

An example showing how to use the locale module to format a number
with
thousand separators:
http://groups.google.com/group/comp.lang.python/t/42e63e3a53f03593/

How non-ASCII characters get entered from the Python interactive
console:
http://groups.google.com/group/comp.lang.python/t/77271907fb195aca/

Raymond Hettinger on the rationale behind the collections.Counter
class:
http://groups.google.com/group/comp.lang.python/t/64d0fe87f7ea9e6/

You could not go to PyCon Atlanta? No problem - many PyCon talks
from
the last two years are available here:
httppycon.blip.tv/
http://python.mirocommunity.org/

An interesting problem: find out the the algorithm used to compute
a
given CRC
http://groups.google.com/group/comp.lang.python/t/b22db1e3e63db596/


========================================================================
Everything Python-related you want is probably one or two clicks away
in
these pages:

Python.org's Python Language Website is the traditional
center of Pythonia
http://www.python.org
Notice especially the master FAQ
http://www.python.org/doc/FAQ.html

PythonWare complements the digest you're reading with the
marvelous daily python url
http://www.pythonware.com/daily

Just beginning with Python? This page is a great place to start:
http://wiki.python.org/moin/BeginnersGuide/Programmers

The Python Papers aims to publish "the efforts of Python
enthusiasts":
http://pythonpapers.org/
The Python Magazine is a technical monthly devoted to Python:
http://pythonmagazine.com

Readers have recommended the "Planet" site:
http://planet.python.org

comp.lang.python.announce announces new Python software. Be
sure to scan this newsgroup weekly.
http://groups.google.com/group/comp.lang.python.announce/topics

Python411 indexes "podcasts ... to help people learn Python ..."
Updates appear more-than-weekly:
http://www.awaretek.com/python/index.html

The Python Package Index catalogues packages.
http://www.python.org/pypi/

Much of Python's real work takes place on Special-Interest Group
mailing lists
http://www.python.org/sigs/

Python Success Stories--from air-traffic control to on-line
match-making--can inspire you or decision-makers to whom you're
subject with a vision of what the language makes practical.
http://www.pythonology.com/success

The Python Software Foundation (PSF) has replaced the Python
Consortium as an independent nexus of activity. It has official
responsibility for Python's development and maintenance.
http://www.python.org/psf/
Among the ways you can support PSF is with a donation.
http://www.python.org/psf/donations/

The Summary of Python Tracker Issues is an automatically generated
report summarizing new bugs, closed ones, and patch submissions.
http://search.gmane.org/?author=status%40bugs.python.org&group=gmane.comp.python.devel&sort=date

nullege is an interesting search Web application, with the
intelligence
to distinguish between Python code and comments. It provides what
appear to be relevant results, and demands neither Java nor CSS be
enabled:
http://www.nullege.com

Although unmaintained since 2002, the Cetus collection of Python
hyperlinks retains a few gems.
http://www.cetus-links.org/oo_python.html

Python FAQTS
http://python.faqts.com/

The Cookbook is a collaborative effort to capture useful and
interesting recipes.
http://code.activestate.com/recipes/langs/python/

Many Python conferences around the world are in preparation.
Watch this space for links to them.

Among several Python-oriented RSS/RDF feeds available, see:
http://www.python.org/channews.rdf
For more, see:
http://www.syndic8.com/feedlist.php?ShowMatch=python&ShowStatus=all
The old Python "To-Do List" now lives principally in a
SourceForge reincarnation.
http://sourceforge.net/tracker/?atid=355470&group_id=5470&func=browse
http://www.python.org/dev/peps/pep-0042/

del.icio.us presents an intriguing approach to reference
commentary.
It already aggregates quite a bit of Python intelligence.
http://del.icio.us/tag/python

Enjoy the *Python Magazine*.
http://pymag.phparch.com/

*Py: the Journal of the Python Language*
http://www.pyzine.com

Dr.Dobb's Portal is another source of Python news and articles:
http://www.ddj.com/TechSearch/searchResults.jhtml?queryText=python
and Python articles regularly appear at IBM DeveloperWorks:
http://www.ibm.com/developerworks/search/searchResults.jsp?searchSite=dW&searchScope=dW&encodedQuery=python&rankprofile=8

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
http://search.gmane.org/?query=python+URL+weekly+news+links&group=gmane.comp.python.general&sort=date
http://groups.google.com/groups/search?q=Python-URL!+group%3Acomp.lang.python&start=0&scoring=d&
http://lwn.net/Search/DoSearch?words=python-url&ctype3=yes&cat_25=yes

There is *not* an RSS for "Python-URL!"--at least not yet. Arguments
for and against are occasionally entertained.


Suggestions/corrections for next week's posting are always welcome.
E-mail to should get through.

To receive a new issue of this posting in e-mail each Monday morning
(approximately), ask to subscribe. Mention
"Python-URL!". Write to the same address to unsubscribe.


-- The Python-URL! Team--

Phaseit, Inc. (http://phaseit.net) is pleased to participate in and
sponsor the "Python-URL!" project. Watch this space for upcoming
news about posting archives.
--
http://mail.python.org/mailman/listinfo/python-list

Friday, April 16, 2010

The New Wallpapers of Ubuntu 10.04 LTS

The New Wallpapers of Ubuntu 10.04 LTS
Final release coming April 29th

On April 29th, Ubuntu 10.04 LTS (Lucid Lynx) will become the 12th release of the Ubuntu operating system.

Among some of the interesting features that will be present in Ubuntu 10.04 LTS (Lucid Lynx), we can mention the newly released GNOME 2.30 desktop environment, which brings lots and lots of improvements in many areas, such as Nautilus, Empathy, Evolution, Tomboy, Totem, Rhythmbox, and many more. Lucid's kernel packages will be based on Linux kernel 2.6.32, and applications such as Oracle's OpenOffice.org 3.2, Mozilla Firefox 3.6, Transmission 1.92 or Pidgin 2.6.6, Mozilla Thunderbird 3 and The GIMP 2.6.8 (all three available from the repositories) will also be present in the final version of Ubuntu 10.04 LTS (Lucid Lynx).Next Thursday (April 22nd) a detailed report on the Ubuntu 10.04 LTS (Lucid Lynx) RC release, where we will unveil more of Lucid's new features!

While Canonical failed once again to deliver that "professional-looking theme" everyone was expecting (promised since the time when Ubuntu 9.10 was still under development), it introduced some nice themes created by various users of the community for the upcoming release of Ubuntu 10.04 LTS (Lucid Lynx): Ambiance and Radiance. Today, we announce the new wallpapers added by Canonical in Lucid Lynx.

Being an LTS (Long Term Support) release, Ubuntu 10.04 (Lucid Lynx) will be definitely a stable, secure, reliable and good-looking operating system! Without further introduction, we'll let you enjoy the new wallpapers. Congrats to the authors of these beautiful photographs!

If you guys want to see the want to see the wallpapers of please visit this link
Visit this Link !!!

Wednesday, April 14, 2010

Python Tutorial


Overview of today's topic:
1. Introduction to python
2. Features of Python
3. Usage of Python
4. First Step with python


1. Introduction to Python
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interperted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.


2. Features of Python

Simple - Python is simple and minimalistic language. Reading a good python program feels almost like reading english, although very strict englist.

East to learn - Python has an extraordinary simple syntax, as already mentioned.

Object Oriented - Python supports procedure-oriented programming as well as object-oriented programming


Like this Python has so many feature in it. Interpreted, Extensible, Embeddable, Extensive Librarires, Portable, etc

3. Usage of Python

Python is often used as a scripting language for web applications, e.g. via mod_python for the Apache web server. With Web Server Gateway Interface a standard API has been developed to facilitate these applications. Web application frameworks or application servers like Django, Pylons, TurboGears, web2py and Zope support developers in the design and maintenance of complex applications. Libraries like NumPy, Scipy and Matplotlib allow Python to be used effectively in scientific computing.

Python has been successfully embedded in a number of software products as a scripting language, including in finite element method software such as Abaqus, 3D animation packages such as Maya, MotionBuilder, Softimage, Cinema 4D, BodyPaint 3D, modo, and Blender, and 2D imaging programs like GIMP, Inkscape, Scribus, and Paint Shop Pro. ESRI is now promoting Python as the best choice for writing scripts in ArcGIS. It has even been used in several videogames.

For many operating systems, Python is a standard component; it ships with most Linux distributions, with NetBSD, and OpenBSD, and with Mac OS X and can be used from the terminal. Ubuntu uses the Ubiquity installer, while Red Hat Linux and Fedora use the Anaconda installer, and both installers are written in Python. Gentoo Linux uses Python in its package management system, Portage, and the standard tool to access it, emerge.


4. First step with Python
We will now see how to run the 'hello world' program in Python. This will teach you how to write, save and run Python programs. There are two ways of using python to run your program - using intractive interpreter prompt or using a source file. We will see both the methods now.
a) Using Interpreter prompt
Start the interpreter on the command line by entering python at the shell prompt.

Applications -> Accessories -> Terminal

dhilip@dhilip-desk:~$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print 'hello world'
hello world
>>>

Noice that python gives you the output of the line immediately.

Choosing an Editor
Before we move on to writing python programs in source files, we need an editor to write the source files. The choice of an editor is crucial indeed. You have to choose an editor as you like. There are many editors available like Geany, Gedit, vim, vi, vim etc, each editor have lots of functionality as their own. One of the very basic requirements is syntax highlighting where all the different parts of your Python program are colorized so that you can see your program and visualize its running.

Using a source file
Now we get back to programming. Like the interpreter prompt, here also we can try the same 'hello world' program.

Start your choice of editor, enter the following program and save it in .py format (filename.py)

#!/usr/bin/python
#filename: helloworld.py
print 'Hello World'

Run this program by opening a termintal and entering the command python helloworld.py.

dhilip@dhilip-desk:~$ python helloworld.py
Hello World
dhilip@dhilip-desk:~$

If you got the output as same as about- You have successfully run your first python program.

Tuesday, April 13, 2010

Today's Guide to Linux Virtualization

Virtualization on Linux is nothing new. It's been around now more than 10 years and has advanced considerably but that doesn't mean it's simple. To the contrary, shops have a dizzying array of virtualization options to manage workloads and storage, and to reduce complexity, costs and energy usage. There's no question about whether to deploy virtualization; the real question is what virtualization solutions to look at and what workloads to virtualize. We'll help cut through the complexity and help set the options straight.

Virtualization isn't always the answer, of course. Some workloads work best on physical servers without any abstraction. But there's quite a few advantages to using virtualization in the server room. In this feature, the first of a four-part series on virtualization, we will begin with an overview of the virtualization solutions on Linux. You can look forward to more details on standard virtualization strategies, virtual appliances, cloud computing, and more, in the weeks ahead.
What's in Virtualization for You

Virtualization isn't a hard sell these days. First and foremost, you have increased server utilization and lower energy costs by using virtualization to maximize the number of workloads running per server. In the bad old days of computing, Linux running on commodity x86 hardware tended to use only a fraction of the available computing power of a server. By using virtualization, you can ensure that the hardware is running a reasonable workload and save power by consolidating several workloads on one system.

Assuming you've chosen the right tools and mapped everything out well, virtualization also means reduced complexity and easier system management. The more advanced solutions come with well-developed management tools so working with tens or even hundreds of virtual machines is no more complicated than managing a single server from one GUI application. Using Parallels Virtuozzo Containers, for example, it takes only a few clicks to configure and deploy a standard OS template that's ready to roll. Using SUSE Studio, you can whip up a virtual appliance to deploy to VMware or Xen in just a few minutes.

Virtualization also means increased flexibility. For example, when a workload starts to outgrow its resources, virtualization means being able to either grant more system resources on the same hardware or moving the VM to a beefier server. If you're working with cloud-based solutions, the sky is the limit on workload flexibility -- but that comes at the cost of reduced flexibility when choosing your host OS and tools, as well as the fact that cloud solutions are still maturing and shaking out some of the kinks.

Note that, for the purposes of this story, we're only looking at solutions meant for server virtualization. This means that some of the outstanding workstation options, like VirtualBox, VMware Workstation, and Parallels Desktop aren't quite applicable. You can use them to run server OSes for testing, of course, but you wouldn't want to try to run mission-critical services off of the desktop virtualization solutions.

Which is fine, because the depth and breadth of server virtualization solutions for Linux provide plenty of choices for every size organization. Whether you're looking to consolidate servers in an enterprise data center, improve a small nonprofit's server infrastructure, or scope out a solution for a start-up Web 2.0 company, Linux should be at the center of the virtualization plan. The question is where it fits, and which projects or vendors to go with.
The Virtualization Landscape

When you say "virtualization," you're saying a mouthful. Mainly because the term comprises a broad range of technologies, and not all of the terms are well-defined. Initially, if you talked about virtualization on Linux you were talking about full virtualization: a host operating system running a few guest operating systems conned into thinking they were running on their own hardware. Maybe Linux, maybe other OSes, depending on what type of virtualization you're talking about. These days, you might be talking about operating system virtualization, storage virtualization or virtual appliances. And of course there's the growing and maturing "cloud computing," category. It all depends on what you need to achieve and how you want to get there.

For operating system virtualization, you'll find plenty of mature options to run on top of Linux and to run Linux on top of. The first thing to decide is whether you want to go with full virtualization or container-based virtualization, or if you want to look at cloud-based computing. Let's start by defining our terms. When I say full virtualization, I'm talking about the gamut of solutions that allow you to run one or more operating systems on top of a hypervisor like Xen, Parallels' Bare Metal, VMware ESXi, and Linux's native Kernel-based Virtual Machine (KVM).

Full virtualization is used most widely today, but container-based virtualization is a great solution for some workloads. Container-based differs in that it's not trying to run multiple OSes, it's "containing" the guest OSes in their own userspace but running on a single OS kernel. Container-based virtualization has the advantage of being more robust. To grossly oversimplify, there's less overhead involved because there's no need to deal with the overhead of emulating the hardware. The downside of container-based virtualization is that it doesn't allow running multiple OSes on the same hardware. Want to run six Linux instances on a server using container-based virtualization? No problem. Want to run a few Linux guests alongside Microsoft Server? Then you're out of luck using container-based solutions.

For container-based solutions, you can look to Parallels Virtuozzo Containers, or its open source but less full-featured cousin OpenVZ. If you're using FreeBSD, there's jails, and if you're using Solaris/OpenSolaris then there's Zones.

What's the practical difference? Using a full virtualization solution you'll be able to deploy most operating systems and mix and match on physical servers. For instance, a smaller organization might have Windows Server 2008 and SUSE Linux Enterprise Server 10 running side-by-side on the same hardware to consolidate their workloads using full virtualization on top of Xen, Parallels, KVM, or VMware, or on top of Microsoft's Hyper-V.

But in a hosting environment, where you've got the need to run dozens of Linux virtual private servers on the same box, something like OpenVZ or Virtuozzo can be a better choice.

The management toolkits and feature sets vary widely as well. KVM has been maturing rapidly but it's still not considered to be on par with Xen, VMware or Parallels solutions on several levels. The KVM status page has a list of areas that are working and are still in need of work. Note that, in the long run, KVM will probably reach parity (or very close to it) with the proprietary solutions. This is especially true given that KVM is in the mainline kernel, and therefore receives a great deal of attention from the kernel community. But in terms of management tools and features today, it's not quite a match for the other options.
Perils, Pitfalls, and Planning

Virtualization is not the magic solution to all of your computing problems, of course. In fact, if you choose the wrong solution or manage virtualization poorly, you can wind up with more headaches than you started out with. To avoid multiplying your workload and paying for the privilege, it's important to set up a roadmap for evaluating solutions, deploying them and managing them at least five years into the future.

First, make sure your organization is prepared to deal with the accounting that goes along with virtualization. Depending on the size and accounting rules, it may be necessary to split hairs over the cost of hardware. When two departments share physical hardware running virtual machines, it's not always clear who's paying for what. It's also not clear who owns the underlying hardware when push comes to shove and some of the virtual machines need more room to breathe.

Does the Web team get to elbow off the virtual machine running a developer platform in order to create a new Web head when they went halfsies on the hardware? If departments have their own IT staff, who has access to the system from top to bottom to deploy and manage virtual machines, and how is that arranged? While not inherently technical problems, these need to be mapped out ahead of time as surely as the memory and storage requirements.

You also want to guard against "virtual sprawl," which is to say the impulse to deploy virtual machines without much planning because it's far easier. It's important to manage virtual machines as if they were physical machines, when it comes to infrastructure planning and deployment.

Another consideration is the types of workload you'll be deploying, the underlying hardware, limits of the virtualization solution, and so on. While many workloads do well under virtualization, not all do, at least not without extensive planning. You'll want to make sure that resource-intensive applications have robust hardware, or perhaps reside on their own systems.

And, of course, training is extremely important. While today's virtualization tools shouldn't pose a great challenge to a competent system administrator, there's an enormous difference between getting by and being skilled at using the tools. If your organization is planning a virtualization deployment with a new toolset, training should be part of the process and budget.

We've only scraped the surface in this first story in the series, but we'll be doing a deeper dive into virtualization throughout April. In the coming weeks, we'll take a look at the best strategies for working with virtualization in the enterprise, a more in-depth conversation about the differences between container-based and full virtualization, and a forecast on cloud computing and what it might mean for your organization.

Python [RELEASED] 2.7 beta 1

On behalf of the Python development team, I'm merry to announce the
first beta
release of Python 2.7.

Python 2.7 is scheduled (by Guido and Python-dev) to be the last major
version
in the 2.x series. Though more major releases have not been
absolutely ruled
out, it's likely that the 2.7 release will an extended period of
maintenance for
the 2.x series.

2.7 includes many features that were first released in Python 3.1.
The faster
io module, the new nested with statement syntax, improved float repr,
set
literals, dictionary views, and the memoryview object have been
backported from
3.1. Other features include an ordered dictionary implementation,
unittests
improvements, a new sysconfig module, and support for ttk Tile in
Tkinter. For
a more extensive list of changes in 2.7, see
http://doc.python.org/dev/whatsnew/2.7.html or Misc/NEWS in the Python
distribution.

To download Python 2.7 visit:

http://www.python.org/download/releases/2.7/

While this is a development release and is thus not suitable for
production use,
we encourage Python application and library developers to test the
release with
their code and report any bugs they encounter.

The 2.7 documentation can be found at:

http://docs.python.org/2.7

Please consider trying Python 2.7 with your code and reporting any
bugs you may
notice to:

http://bugs.python.org


Enjoy!

--
Benjamin Peterson
2.7 Release Manager
benjamin at python.org
(on behalf of the entire python-dev team and 2.7's contributors)
--
http://mail.python.org/mailman/listinfo/python-list

--

About Me

My photo
Well.. I'm a Friendly hearted Guy. Going to complete my Engineering. Well I'm a great Linux Lover and want to achieve lot of things in Linux.