How to call built in function 'open' from inside object that has 'open' method?

Fredrik Lundh fredrik at
Wed Apr 30 15:58:37 CEST 2003

"vadim" <vf at> wrote:
> I am new to Python and do not know the answer to very
> simple how to 'open' from inside another object that
> has 'open' method. I know that in C++ I should use
> following syntax ::open.
> More details on reasons. I have met this problem trying to
> write a simple script use ActiveScripting  inside IE.
> I am trying "file = open(...) but because context window
> object has 'open' method that just opens window it is called
> first.

Unless you're typing "file =", the class you're
in has nothing to do with it.

>From your description, chances are that you're using "from
something import *", where "something" defines an "open"
method.  The solution to that is simple: don't do that.

more here:


More information about the Python-list mailing list