nting, the output window closes.
How do I get the output window to stay open, or where is the output stored?
Thanks!
Tom Strickland
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
The problem has been solved. It turned out that I made a newbie mistake
that had nothing to do with importing lists. I have a function, sma,
which calculates the moving average for a list of prices. I passed the
"close" (subsequently changed to "cloze") list to the function as an
argument. Ther
Original Message
Subject:Re: Importing a List from Module
Date: Sun, 28 Aug 2005 16:37:26 -0500
From: Tom Strickland <[EMAIL PROTECTED]>
To: tutor@python.org
The problem has been solved. It turned out that I made a newbie mistake
that had nothing to d
Tom Strickland wrote:
> Eric,
>
> No, "xy" isn't used anywhere else in the program. It's just a dummy
> variable I used to print out "enterData.close". I could easily have
> left it out.
>
> Tom
>
>
> Eric Walker wrote:
>
>&g
Byron,
I'm confused (as usual). In "def returnList():" that you write below,
should the items in the newList list be close[i] and looped to fill
"newList" with the contents of "close"? If so, how is "returnLost"
different from "close"
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)
>
I have a module called "enterData" which generates a list, "close" from
a data file. "close" is a list of floats. When I put a print statement
in that module it will print out an individual member of the list. For
example,
print close[0]
prints the first member of the list.
In my "main"
Alan,
Now I understand! Thanks again for the explanation!
Alan G wrote:
>> "for" loop as you suggest, the program won't enter the loop unless
>> "s" is initialized so that it's in "input". How do I do that?
>
>
> for s in input:
>
> means that s takes on each value in input.
> input is your fil
Alan,
Thanks for your comments. I see how I can simplify my code, but I've run
into a problem trying to do so. If I replace the "while" loop with a
"for" loop as you suggest, the program won't enter the loop unless "s"
is initialized so that it's in "input". How do I do that?
Also, near the en
************
Danny Yoo wrote:
>On Tue, 23 Aug 2005, Tom Strickland wrote:
>
>
>
>>I changed the program in accordance with your advice and it now runs
>>perfectly!!!
>>
>>
>
>Hi Tom,
>
>That's ve
Danny,
I changed the program in accordance with your advice and it now runs
perfectly!!!
Thanks for the education!
Tom Strickland
Danny Yoo wrote:
>[Danny]
>
>
>>>Anyway, this doesn't answer the problem: how do we add elements to a
>>>list? In Python, we c
Danny,
Thanks for your comments and your help. I've added my comments to your
text below. Hopefully it will be in red so you can easily identify them.
Tom
Danny Yoo wrote:
>Hi Tom,
>
>Before we continue: it looks like you're starting to learn Python. Have
>you gone through one of the tutorial
I have imported a text file consisting of lines of csv. Each line
consists of six items separated by commas. I have converted this file
into a matrix of string variables, T[i]. Now I want to extract each of
the individual strings, convert five them to floats, and save them in
individual vectors
13 matches
Mail list logo