LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   python help for beginner (https://www.linuxquestions.org/questions/programming-9/python-help-for-beginner-319685/)

thtr2k 05-03-2005 07:55 AM

python help for beginner
 
Does anyone know how to write a script to list or search directories and files along with permission? i'm a beginner of Python

bulliver 05-03-2005 03:29 PM

Code:

import os
os.listdir(os.getcwd) # returns a list of files in the current directory

Other than that, you are going to have to be a lot more specific with what you are trying to do here...

The documentation for the os module is a good start:
http://docs.python.org/lib/module-os.html


All times are GMT -5. The time now is 06:42 AM.