[Tutor] newbie problems with running scripts
Sun, 20 Aug 2000 17:05:04 +0800
Thanks for the advice.
I tried your suggestions but I still get the same error kind of errors.
Does anyone out there use pythonwin on windows 2000?
----- Original Message -----
From: "Richard Chamberlain" <email@example.com>
To: "Andre Quintos" <firstname.lastname@example.org>
Sent: Sunday, August 20, 2000 3:56 PM
Subject: Re: [Tutor] newbie problems with running scripts
> Hi Andre,
> Firstly you should import with the extension so it should be:
> import myfile
> Secondly you might find that python cannot find your file. The reason is
> that python looks in certain directories. There are two ways for you to
> get round this. The easiest way for you is to use import on one of the
> pythonwin menus. The other way is to do this at the interactive shell:
> import sys
> print sys.path
> That should give you a list of locations python is looking in.
> should enable you to type just:
> import myfile
> Andre Quintos wrote:
> > Hi.
> > I biought this book from O'reilly called Learning Python and am
> > all their excercises. So I went to the python.org site and downloaded
> > everything I needed (I use a Win2K system).
> > I have installed the python 1.5.2 and pythonwin. I use these programs
> > the excercises in the book.
> > While in pythonwin, I create the file called myfile.py which contains
> > following:
> > title = "The Meaning of Life"
> > The book then tells me to do this:
> > >>>import myfile.py
> > >>>print myfile.title
> > When I do the first statement I get this error in pythonwin:
> > Traceback (innermost last):
> > File "<interactive input>", line 1, in ?
> > ImportError: No module named py
> > What could be the problem here? Is it a problem with the installation of
> > programs or the problem with the code? Or is there something I should do
> > make python and pythonwin work properly in win2k?
> > Thanks for the help (in advance)
> > Andre
> > those who believe in free will make the best puppets of all.
> > -- Lucifer #3
> > _______________________________________________
> > Tutor maillist - Tutor@python.org
> > http://www.python.org/mailman/listinfo/tutor