Modes of python
Python has two basic modes they are
1.Interactive mode
Interactive
mode is a command line shell which gives immediate feedback for each
statement.
In interactive mode what you type is immediately run. Interactive
mode allows you to test out and see what Python will do. If you ever feel the need to play with new
Python statements, go into interactive mode and try them out.
To start interactive mode in windows open
command prompt-> enter into python27 directory of C drive (C:\python27)->python
2.
normal mode/batch mode
In normal mode we write the python code in
editors or ide’s and save the file with extension .py
Different editors are notepad, notepad++,
nano, editpuls, idle,……………
After developing the .py files in editors we
submit those .py files to the python interpreter
In windows open command prompt-> enter into
python27 directory of C drive
(C:\python27)->
pythyon filename.py
ex: open notepad write the following code
i=1000
j=2000
print i+j
save the above file with prog1.py in
C:/python27 folder
C:/python27>python test.py
Different ide’s(integrated development
environment) are PyCharm,Eric,Eclipse,Netbeans,…….
After developing python applications in ide’s
directly we can run python application by using short cut key
No comments:
Post a Comment