how to reuse class deinitions?

sam python.sam at
Mon Oct 2 00:27:52 CEST 2006

hello all,

pretty straightforward question here, i think. i'm experimenting with
classes and have written a File class that looks like it's worth
keeping for future use. however, i cannot work out where to put it for
this purpose or how to get it in.

i figured i'd try a bit of (un)inspired guesswork by putting it in my
module folder, appending sys.path to tell the interpreter where this
was, and importing it like a module. probably don't need to tell you
that that didn't work, but i'm drawing a blank in the tutorial and not
getting any luck in the archives here. maybe i'm just not searching
with the right words. it's late here and my brain's switching off...

cutting and pasting it into the interpreter is a bit of a bore. any

much appreciated in advance,


PS i've just reached first base with classes, and i think i'm starting
to see what the big deal is about OOP. it's like someone's turned a
light on.

More information about the Python-list mailing list