Quantcast
Channel: I need a list made out of a call such as os.system('ls ' + path) - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by rdas for I need a list made out of a call such as os.system('ls ' +...

You can handle ~ in the input. And ., .. too. os.listdir(os.path.abspath(os.path.expanduser(user_input))) Ref: https://docs.python.org/2/library/os.path.html#os.path.expanduser...

View Article



I need a list made out of a call such as os.system('ls ' + path)

I really need a list out of a system call such as os.system('ls ' + input) I've tried googling of course, but didn't find much. Also tried different ways of coding it but I cannot get it to work....

View Article
Browsing all 2 articles
Browse latest View live


Latest Images