Sunday, September 14, 2014

Python for Testers: Creating and Running python programs


Interactive Python
We can start writing python code directly using python interactive environment
For working with python in interactive mode, open command prompt, write python, enter
Now we will be in python interactive mode can write and execute command






Executing Python Code
Apart from running python code in interactive environment, we can execute python from

à Command Line “python   myfile.py”
à Python script can be  executed from python IDE



Start of Python Scripting
Way-1 We can write code in interactive mode, for that go to command prompt and write python, it will invoke python interpreter. Now we can write and execute python statements




Way-2  Open a notepad file and write python scripts there, then go to command prompt and invoke python interpreter with filename as argument here it will execute file






No comments:

Post a Comment