Re: exec behaviour

2005-11-04 Thread N. Pourcelot
Thanks for you reply. I added locals() to my exec statment, so it worked, but I wasn't so sure about my interpretation of the problem. Fredrik Lundh wrote: > N. Pourcelot wrote: > > >>I can't understand some specific behaviour of the exec statment. >> >>

Re: how to open a windows folder?

2005-11-04 Thread N. Pourcelot
With module os, you may execute some files. something like : os.execl("explorer.exe", *arg) (syntax ?) you sould also be able to send some command to console. Bell, Kevin wrote: > I'd love to be able to open up a windows folder, like c:\temp, so that > it pops up visually. I know how to drill do

exec behaviour

2005-11-04 Thread N. Pourcelot
Hello, I can't understand some specific behaviour of the exec statment. For example, say that I create such a class A : class A: def __init__(self): self.n = 3 self.m = None def h(self, ini): n = self.n m = self.m if ini: exec("def m(x): retu