Creating a module that uses itself

Asheesh Laroia pan-news at asheeshenterprises.com
Mon Mar 18 01:11:10 EST 2002


I'm writing a PageMaker-to-specialized-HTML module (henceforth
"pm2html").  In the module, I define the classes Article, Headline, and
Photo, among others.

In the Article class, I want to have a Headline object.  Is this
possible?  Right now, ActivePython's PythonWin spits a syntax error at me
because the Headline class is not defined.  But I can't

	import pm2html

(which is where the Headline object lives) because *that's the file I'm
working in*!

So, how do I create a module that uses objects it creates?

-- Asheesh.



More information about the Python-list mailing list