Newbie Question

Emile van Sebille emile at fenx.com
Fri Dec 22 11:41:01 EST 2000


I'm still not sure, as this works as well:

import os

class Class:
    def __init__(self, root):
        self.root = root
    def func(self, root, files):
        print self
        print root
        print files
    def run(self):
        os.path.walk(self.root, Class.func, arg)

root = r'C:\etvwin'
arg = Class(root)

arg.run()

--

Emile van Sebille
emile at fenx.com
-------------------


"Bob W." <removethis_kranki2 at earthlink.net> wrote in message
news:42074t8a8e8604sgl77egadao721tk62ik at 4ax.com...
> Being really new, I am not certain about the next
statement.  However,
> it seemed to me that the difference might be that you are
executing
> the walk() in the global namespace rather than the address
space of
> the class.  Thanks for your input.
>






More information about the Python-list mailing list