Professional Documents
Culture Documents
Lab # 12
Interacting with Basics of OS through Python shell
EXERCISE
ThreadName to print the name of the thread which is passed to the function
‘print_time’.
Time.ctime(time.time())
time() is a method of time module which is returning the number of
seconds passed since epoch.
ctime() is also a method of time module which is taking the seconds
returned by time.time() and is printing the a string representing local
time.
3. The second argument (the *mode*) in open method determines how the
file gets opened. What ‘ru’ mode in open function denotes?
Opening a file with the mode 'U' or 'rU' will open a file for reading in universal newline
mode.
The design of all built-in operating system dependent modules of Python is such that as
long as the same functionality is available, it uses the same interface.