To perform a stat system call on the given path, we can use the os.stat() functionof OS. First import the the os module and then simply specify the path of the file that you want to perform the system call on.
Let's see an example of how to use the os.stat function
import os print "-" * 30 print "os.stat = status of a file " , os.stat('/usr/bin/vi') print "-" * 30
Recommended Python Training – Treehouse
For Python training, our top recommendation is Treehouse.
Treehouse is an online training service that teaches web design, web development and app development with videos, quizzes and interactive coding exercises.
Treehouse has beginner to advanced Python training that programmers of all levels benefit from.
Read more about: