FAQ
Hi,

I'm looking for the listdir function in os module,
to study it, but I can't find the

def listdir(self):
etc...


Excuse for my poor eglish.
Where is the function listdir definition?

Thanks in advance,

Manuel

Search Discussions

  • Just at Jun 20, 2003 at 8:30 pm
    In article <s6KIa.218256$g92.4546830 at news2.tin.it>,
    "manuel" wrote:
    Hi,

    I'm looking for the listdir function in os module,
    to study it, but I can't find the

    def listdir(self):
    etc...


    Excuse for my poor eglish.
    Where is the function listdir definition?
    It's written in C, in Modules/posixmodule.c. os.py imports it.

    Just
  • Manuel at Jun 20, 2003 at 9:36 pm
    It's written in C, in Modules/posixmodule.c. os.py >imports it.
    Thanks.

    Exist another method to read the files
    in a directory? I want write a script for Blender,
    and because the OS module isn't builtin, and I've need
    only this function, I want write a very simple
    python class to read only the files in a dir.

    It's possible?
  • Just at Jun 20, 2003 at 9:55 pm
    In article <b7LIa.218628$g92.4560101 at news2.tin.it>,
    "manuel" wrote:
    It's written in C, in Modules/posixmodule.c. os.py >imports it.
    Thanks.

    Exist another method to read the files
    in a directory? I want write a script for Blender,
    and because the OS module isn't builtin, and I've need
    only this function, I want write a very simple
    python class to read only the files in a dir.

    It's possible?
    If you can't "import os" in Blender, something is wrong...

    Just
  • Manuel at Jun 20, 2003 at 10:13 pm
    If you can't "import os" in Blender, something is wrong...
    I can, but I have full python installed.
    Many users have only Blender and Python22.dll;
    this mean they don't have the os.py... :-(

    A simple listdir in python isn't possible?

    Thanks again,

    Manuel
  • Hans Nowak at Jun 20, 2003 at 11:02 pm

    manuel wrote:
    If you can't "import os" in Blender, something is wrong...

    I can, but I have full python installed.
    Many users have only Blender and Python22.dll;
    this mean they don't have the os.py... :-(

    A simple listdir in python isn't possible?
    This might work: import the nt module (it's built-in), then use nt.listdir.
  • Peter Hansen at Jun 21, 2003 at 3:21 am

    Hans Nowak wrote:
    manuel wrote:
    If you can't "import os" in Blender, something is wrong...
    This might work: import the nt module (it's built-in), then use nt.listdir.
    In which case "import nt as os" _might_ be good for portability.
    Otherwise you'd be sprinkling nt.listdir's around and confusing
    anyone trying to read the code.

    -Peter
  • Manuel at Jun 21, 2003 at 1:05 pm
    This might work: import the nt module (it's built-in), then use
    nt.listdir.

    It work fine. :-)
    And for linux?
  • Andrew Bennetts at Jun 21, 2003 at 2:49 pm

    On Sat, Jun 21, 2003 at 01:05:29PM +0000, manuel wrote:
    This might work: import the nt module (it's built-in), then use
    nt.listdir.

    It work fine. :-)
    And for linux?
    posix.listdir, rather than nt.listdir.

    -Andrew.
  • Manuel at Jun 21, 2003 at 9:45 pm
    posix.listdir, rather than nt.listdir.
    Thanks!

    Manuel

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 20, '03 at 8:27p
activeJun 21, '03 at 9:45p
posts10
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase