Where does the command "ls" in some doctest files come from ?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Sep 8 19:39:01 EDT 2008


On Mon, 08 Sep 2008 22:04:29 +0000, KLEIN Stéphane wrote:

>> You found the ls() function in a docstring from Zope. The doctest seems
>> to be testing ls(). That suggests to me that ls() is defined in Zope,
>> not doctest.
> 
> Well, ls() is one test utility function defined in zc.buildout.testing
> module. This module contain many utility function like mkdir, ls, cat...
> 
> 
>> Why do you ask?
> 
> I'm curious... I've seen this utility and I would like to know how can I
> use it.


Untested:

from zc.buildout.testing import ls
ls("somefile")




-- 
Steven



More information about the Python-list mailing list