Two classes problem

Gurpreet Sachdeva gurpreet.sachdeva at gmail.com
Wed Feb 2 13:43:05 EST 2005


I have two classes;

a.py -->

#!/usr/bin/python
global test
test =''
class a(b):
        def __init__(self,test):
                print test
print 'Outside: '+test

b.py -->

#!/usr/bin/python
import a
a.a('Garry')

I want to pass this string (or any object later) to a.py and that too
outside the scope of class a.
Is that possible??? If yes, how???

Thanks,

Garry



More information about the Python-list mailing list