Tom Strickland wrote:
> In my "main" module I import "enterData" and try to read the first 
> element of "close" as follows:
> 
>     import enterData
>     xy=enterData.close
>     print xy[0]   
> 
> 
> When I do this it prints out the entire "close" list, not just the first 
> term.


Hi Tom,

I would create a function in your module that returns the list.  Here's 
a quick, simplified example:

def returnList():
        newList = []
        newList += [123.45]
        newList += [529.59]
        newList += [259.92]
        return newList
        
aList = returnList()
print aList


Note the return statement...  This enables assignment, as you have done 
in "xy=enterData.returnList()"

Hope this helps,

Byron
---

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to