Jan 1, 2013

Introduction to Python Programming Language


 


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 interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.


 


The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, http://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.


 


In this tutorial am using linux operating system for compiling python script.


 


Step 1


 


First you need to check, python is already installed in your system by using the following command


 


which python


 



 


If python is already installed in your system then you got an output like below


 


python-version-finding




 


Step 2


 


Open any text editor then enter some python script and save the file with .py extension.




 


Step 3


 


Change the file permission to executable by using the following command


 


chmod u+x filename.py


 


or


 


chmod 777 filename.py




 


Step 4


 


Execute the python file using the following command


 


./filename.py




 

No comments:

Post a Comment