You are on page 1of 1

17CS61

Lab # 11
Interacting with Basics of OS through Python shell

EXERCISE

1. Execute all the codes given in manual. Attach snapshots.

2. Create a new text file in python using commands given in manual. Name of
the file should be your roll no. Write few lines of your choice in that file.
Also display those lines using ‘read’.

3. What is BSD socket interface?


Socket is a library module which provides access to the BSD socket interface. It helps us
to find the hostname and IP address of a local machine. It contains two methods:
1. Gethostname(): to retrieve the standard host name for the local computer.
2. Gethostbyname(): to retrieve host information corresponding to a host name
from a host database.

You might also like