how to put "ls -a" output in a variable in Python 3.x ?
how to put "ls -a" output in a variable in Python 3.x ?
This sounds like a bad idea. What exactly do you want to do?
just list all file name and print them in Python
why don't you use the functionality provided in the os module?
import os
listofdirs = os.listdir(os.getcwd())
Last edited by PeterP24; June 6th, 2012 at 05:38 AM. Reason: added code!
Bookmarks