Re: Python - Getting Imports Working

  • From: "tribble" <lauraeaves@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 27 Dec 2007 12:17:12 -0500

Hi Jim (wow, I almost typed jum... keyboard can't spell...*smile*)
To answer your question on instantiating an object, I don't know about 
Pithon, but in C++ you are referring to the instantiation of a template 
usually a class (there are function and data templates also, but that comes 
later).
So you instantiate a type/function/data type, but the word instantiate can 
also be used in the context of creating an object from a type.  In the case 
of template classes, a template is not of known type and therefore must be 
instantiated into a "real" type before an object of that type can be 
"instantiated" or created/initialized.
In short, "instantiate" in some instances  can produce either a real 
type/function/data or produce and initialize an object.
Hope that helps.  The word "instantiate", like the word "object", may have 
several meanings.
Good luck.
Oh, and take a moment to reflect on the news this morning.  I hope the 
people in Pakistan can recover and our relations can remain positive.
Sorry for the decent into politics, but this is news.
Cheers.
--le



----- Original Message ----- 
From: <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, December 27, 2007 11:11 AM
Subject: Re: Python - Getting Imports Working


Hi Richard,
Thanks for asking which error I got. As it turned out, I needed to qualify
that the class I wanted to work with came from my module. I needed to say

import elevator

# Instantiate the Elevator class.

e = elevator.Elevator()

That brings up a question. Do you instantiate classes or do you instantiate
objects? I think that the terminology in the above comment line may be
wrong.

Thanks.

Jim

James D Homme, , Usability Engineering, Highmark Inc.,
james.homme@xxxxxxxxxxxx, 412-544-1810

"Never doubt that a thoughtful group of committed citizens can change the
world.  Indeed, it is the only thing that ever has." -- Margaret Mead




             "rrdinger"
             <rrdinger@olypen.
             com>                                                       To
             Sent by:                  programmingblind@xxxxxxxxxxxxx
             programmingblind-                                          cc
             bounce@freelists.
             org                                                   Subject
                                       Re: Python - Getting Imports
                                       Working
             12/27/2007 10:48
             AM


             Please respond to
             programmingblind@
               freelists.org






Hi Jim,

What error are you getting?

Richard
----- Original Message -----
From: <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, December 27, 2007 5:32 AM
Subject: Python - Getting Imports Working


>
> Hi,
> When I try to import code I wrote, I get errors. I took the code and put
> it
> in the same file as the code that's calling it, so I know it works. I saw

> a
> tutorial that advises me to edit the registry to make this work. The
> tutorial seems to be talking about the version of Python from python.org.

> I
> have ActiveState Python. I am OK with editing the registry, but I'd
rather
> not do it. Is there a way to get this working that doesn't involve
editing
> the registry? What is it?
>
> Thanks.
>
> Jim
>
> James D Homme, , Usability Engineering, Highmark Inc.,
> james.homme@xxxxxxxxxxxx, 412-544-1810
>
> "Never doubt that a thoughtful group of committed citizens can change the
> world.  Indeed, it is the only thing that ever has." -- Margaret Mead
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: