Hello!
>>When I do this it prints out the entire "close" list, not just the first
>>term.
In your module:
>for i in range(5):
>print close[i]
Here you tell it to do so. It does it when it gets imported.
HTH and Greets, J"o!
--
Wir sind jetzt ein Imperium und wir schaffen uns
unsere eigen
I'm still stumped by this one. Here is a stripped-down version of your code
that works fine for me:
# test.py
#!/usr/bin/python2.4
import enterData
xy=enterData.close
print xy[0]
print "Finished"
##This is the enterData.py module
##!/usr/bin/python2.4
input = open('SPY2.csv', 'r')
close =
On 8/28/05, Tom Strickland <[EMAIL PROTECTED]> wrote:
Tom Strickland wrote:>>Here are the modules in question:>>
> ##This is the enterData.py module> ##!/usr/bin/python2.4> input = open('/home/tom/Python/Input/SPY2.csv', 'r')> s = input> date =[]> open = []> close = []> hi = []
> lo = []> v
Tom Strickland wrote:
>>Here are the modules in question:
>>
>>
> This is the main.py module
>
> #!/usr/bin/python2.4
> import enterData
> import movAvg
> smavg=[]
> xy=enterData.close
> print xy[0]
> smavg = movAvg.sma(20,enterData.close)
> emavg=[]
> emavg=movAvg.ema(20,enterData.close)