[Edu-sig] Technical question

Kirby Urner pdx4d@teleport.com
Thu, 10 May 2001 20:29:25 -0700


Thanks Seth.

Now that I'm following your example and importing the module,
vs using import foo from bar, and writing type(woo,bar.foo)
instead of type(woo,foo), it's working OK.

I'm not sure that's the issue.  It could be a path thing 
somehow, in the python21\ocn\mathobjects, which contains
an __init__.py, isn't in my python path (\ocn is though).  
I go from mathobjects import *, and that brings Fraction,
Poly, Matrix and Sqmatrix top level.

Anyway, your example led me to working code.

 >>> from mathobjects import *
 >>> f = Fraction(1,2)
 >>> p = Poly([1,0],'t')
 >>> p
 t
 >>> f
 (1/2)
 >>> p*f
 (1/2)*t
 >>> f*p
 (1/2)*t

Gratefully,

Kirby

-----Original Message-----
From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On
Behalf Of Seth David Schoen
Sent: Thursday, May 10, 2001 5:56 PM
To: edu-sig@python.org
Subject: Re: [Edu-sig] Technical question

I didn't have any trouble with a mutual import under Python 1.5.2:

<<SNIP>>