How to make delays in Python script
Time module provides the functionality to make delays in Python script. import time time.sleep(interval) Where 'interval' is the required delay
Read MoreFor Techs.... Techniques.... Technologies....
Time module provides the functionality to make delays in Python script. import time time.sleep(interval) Where 'interval' is the required delay
Read MoreWe can check the syntax of Python script without execution, using the following command. #python -m py_compile scriptname Where 'scriptname'
Read MoreOs module provides the function to execute shell script from Python. import os os.popen("command") Here we need to replace "command"
Read MoreOs module provides the function to remove folder if its empty. import os os.rmdir(folder) Where 'folder' is the name of
Read MoreOs module provides the utility to print the current working directory. import os os.getcwd()
Read MoreTo change the working directory in Python we can use os module. import os os.chdir(path) Where 'path' is the full
Read MoreAll the exceptions can be printed using the following format. except: print sys.exc_info()[0:2]
Read MoreWe can insert element to the n'th position of the list using the following command. #listname.insert(n, 'value') Where, listname -
Read MoreWe can remove element from list using the index number. #del listname[index]
Read More