New install. Getting ImputError

Gerald Klix gklix at hassler.de
Tue Jan 25 13:03:20 EST 2000


Vinnieboy wrote:

> Hi, maybe I can help,
>
> I'm a newbee too, but..
> I think vtest must be a function (or?????) He can't find vtest because there
> isn't a function called like that. So create a function called vtest, and in
> that function your typing:
> print 'this is a test'
> In the code from your program you'll have to write..
>
> vtest ()
>
> Greetz from Vinnieboy (the Netherlands),
>
> -I know, my English isn't very well.
>
> Thomas D'Urso <tjdurso at slip.net> schreef in berichtnieuws
> 388AAE5A.B20A7BCE at slip.net...
> > Just installed / started with Python and reading Learning Python. When I
> > try to execute this code:
> >
> >    import test
> >    from test import vtest    # <-- error on this line
> >    print vtest
> >
> > file "test" contents:
> >
> >    vtest = 'this is a test'
> >
> > I get debugger error for 2nd line:    ImputError: cannot input name
> > vtest
> > The global variable says ImputError is:     Input can't fine module, or
> > can't find name in module.
> >
> > It give no other errors as far as opening the file. Working on a Mac G4
> > with OS 9. Python 1.5.2.
> > Doing the "import test.autotest" reports no errors.
> >
> > TIA Thomas
> >
> >
> >
> >

If the file name is realy "test", python will not find it, you have to rename
it to "test.py" to make things work.






More information about the Python-list mailing list