Skip to content

Instantly share code, notes, and snippets.

@itkr
Last active August 29, 2015 14:22
Show Gist options
  • Save itkr/3de289cd1ebbead3a7bd to your computer and use it in GitHub Desktop.
Save itkr/3de289cd1ebbead3a7bd to your computer and use it in GitHub Desktop.
python ls command
import commands
def ls(path):
return commands.getoutput('ls -m {}'.format(path)).replace('\n', '').split(', ')
ls('~')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment