Monday, February 18, 2013

start with python

 Before writing any post on python I want to thank Guido van Rossum, the creator of python. 
I will start with examples.... So don't look for any definitions here. And also this blog is only for python newbies.

I am using ubuntu, So already python 2.7 is installed. Install it from http://www.python.org/

On python Terminal, type help() 

>>> help()

Welcome to Python 2.7!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/2.7/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

Now we will enter into help terminal. Just type keywords in help terminal like below.


help> keywords

Here is a list of the Python keywords.  Enter any keyword to get more help.


and                 elif                if                  print
as                  else                import              raise
assert              except              in                  return
break               exec                is                  try
class               finally             lambda              while
continue            for                 not                 with
def                 from                or                  yield
del                 global              pass          

So we can be able to see all keywords present in python. Like this we can try topics and modules also.
We can get good python tutorial in terminal itself. Just try this...





No comments:

Post a Comment