[Tutor] module Cyclic references

Andy W toodles at yifan.net
Sun Jan 6 19:37:42 CET 2002


> hi all,

Hi

> my code is behaving in a strange way.

Goody, I like strange things. *gets to the task at hand*

> >>> import test
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "test.py", line 1, in ?
>     from movie import Movie, Rental
>   File "movie.py", line 1, in ?
>     import price
>   File "price.py", line 1, in ?
>     from movie import Movie, Rental
> ImportError: cannot import name Movie
> >>>
>
> This sequence works just fine!
> >>> import price
> >>> import movie
> >>> import cust
> >>> import test

Umm this sounds too simple to be true, but is there a typo or something?
Unless I'm totally wrong, and someone smarter and more brilliant comes up
with a different answer, can you please do the following:

###
import movie
print dir(movie)
###

and then email again what it comes up with.

Andy W

>
> thanks
> karthik.
>
> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of marco
> Sent: Saturday, December 22, 2001 5:48 AM
> To: python-list at python.org
> Subject: Re: vi or emacs for editing Python on Linux?
>
>
> "maxm" <maxm at mxm.dk> writes:
>
> > One of my biggest problems in switching is my editor. On windows I use
> > Ultraedit as a general editor, and i type really fast in it. Knowing the
> > shortcuts and all. Every time I boot up one of my Linux machines I have
a
> > hard time editing files under the arcane unix editors. I have tried both
> > emacs and vim and I disklike both!
>
> Maybe Nedit is good for Windows people: www.nedit.org
> (but I use emacs myself -- those "arcane" editors are
> tried and true).
>
> --
> mdlch at altavista.net
> Gunnm: Broken Angel
> http://reimeika.ca/
> --
> http://mail.python.org/mailman/listinfo/python-list
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>





More information about the Python-list mailing list