Results 1 to 4 of 4

Thread: How to solve This Python and Bash problem ?

  1. #1
    Join Date
    Apr 2011
    Location
    Chittagong,Bangladesh
    Beans
    149
    Distro
    Ubuntu 14.04 Trusty Tahr

    How to solve This Python and Bash problem ?

    how to put "ls -a" output in a variable in Python 3.x ?

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: How to solve This Python and Bash problem ?

    This sounds like a bad idea. What exactly do you want to do?
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Apr 2011
    Location
    Chittagong,Bangladesh
    Beans
    149
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to solve This Python and Bash problem ?

    just list all file name and print them in Python

  4. #4
    Join Date
    Aug 2007
    Beans
    190
    Distro
    Ubuntu

    Re: How to solve This Python and Bash problem ?

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •