On Tue, 23 Dec 2008 15:39:52 -, Aaron Stepp
wrote:
import random
from rtcmix import *
from chimes_source import * # Chime.play()
from rhythmblock import * # rhythmBlock.rhythmTwist() and
rhythmBlock.printStuff()
from pitchblock import * # pitchBlock.pitchTwist() and
pitchBlock.printSt
D'Arcy J.M. Cain wrote:
> On Tue, 23 Dec 2008 10:20:59 -0500
> Steve Holden wrote:
>> D'Arcy J.M. Cain wrote:
>>> Well, if all you want is a loop:
>>>
>>> for v in vars:
>>> locals()[v] = []
>>>
>> Note that this isn't guaranteed to work. While locals() will return a
>> dict containing
On Tue, 23 Dec 2008 10:20:59 -0500
Steve Holden wrote:
> D'Arcy J.M. Cain wrote:
> > Well, if all you want is a loop:
> >
> > for v in vars:
> > locals()[v] = []
> >
> Note that this isn't guaranteed to work. While locals() will return a
> dict containing the names and values from th
import random
from rtcmix import *
from chimes_source import * # Chime.play()
from rhythmblock import * # rhythmBlock.rhythmTwist() and
rhythmBlock.printStuff()
from pitchblock import * # pitchBlock.pitchTwist() and
pitchBlock.printStuff()
from lenEval import * #greaterThan.sovler()
indexra
D'Arcy J.M. Cain wrote:
> On Mon, 22 Dec 2008 22:32:17 -0500
> Aaron Stepp wrote:
>> Instead of writing a long list of initializations like so:
>>
>> A = [ ]
>> B = [ ]
>> ...
>> Y = [ ]
>> Z = [ ]
>>
>> I'd like to save space by more elegantly turning this into a loop. If
>
> Well, if all you
On Mon, 22 Dec 2008 22:32:17 -0500
Aaron Stepp wrote:
> Instead of writing a long list of initializations like so:
>
> A = [ ]
> B = [ ]
> ...
> Y = [ ]
> Z = [ ]
>
> I'd like to save space by more elegantly turning this into a loop. If
Well, if all you want is a loop:
for v in vars:
On Mon, Dec 22, 2008 at 7:52 PM, Aaron Stepp wrote:
>
> On Dec 22, 2008, at 10:43 PM, Chris Rebert wrote:
>
>> On Mon, Dec 22, 2008 at 7:32 PM, Aaron Stepp
>> wrote:
>>
>>>
>>> Thanks for the help so far, I think I'm starting to get a hang of the
>>> syntax.
>>>
>>> I think I need to state my go
On Tue, 23 Dec 2008 03:52:35 -, Aaron Stepp
wrote:
Simply put, I just need enough arrays to hold a list of
pitches/rhythms. Then I'll have each list member returned to an
instrument defined in another module.
One "array" can hold a list of pitches/rhythms. I'm still not terribly
cl
On Dec 22, 2008, at 10:43 PM, Chris Rebert wrote:
On Mon, Dec 22, 2008 at 7:32 PM, Aaron Stepp
wrote:
Thanks for the help so far, I think I'm starting to get a hang of the
syntax.
I think I need to state my goal more clearly.
Instead of writing a long list of initializations like so:
A
On Mon, Dec 22, 2008 at 7:32 PM, Aaron Stepp wrote:
>
> Thanks for the help so far, I think I'm starting to get a hang of the
> syntax.
>
> I think I need to state my goal more clearly.
>
> Instead of writing a long list of initializations like so:
>
> A = [ ]
> B = [ ]
> ...
> Y = [ ]
> Z = [ ]
>>> class test():
def __init__(self, name):
self.name = 'My name is %d' %name
>>> l = []
>>> for name in range(10):
l.append(test(name))
>>> l
[<__main__.test instance at 0x02852E18>, <__main__.test instance at
0x02852C38>, <__main__.test instance at 0x028528A0>,
On Dec 22, 2008, at 10:15 PM, r wrote:
I can't check you code because i don't have these modules but here is
the code with proper indention
import random
from rtcmix import *
from chimes_source import *
from rhythmblock import *
from pitchblock import *
indexrand = random.Random()
indexrand.se
I can't check you code because i don't have these modules but here is
the code with proper indention
import random
from rtcmix import *
from chimes_source import *
from rhythmblock import *
from pitchblock import *
indexrand = random.Random()
indexrand.seed(2)
rhythm = rhythmBlock()
pitch = pitchB
I can't check you code because i don't have these modules but here is
the code with proper indention
import random
from rtcmix import *
from chimes_source import *
from rhythmblock import *
from pitchblock import *
indexrand = random.Random()
indexrand.seed(2)
rhythm = rhythmBlock()
pitch = pitch
Chris Rebert:
> It likely goes without saying, but you ought to read the fine tutorial as
> well.
I also suggest to fix the messed up indentations.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Dec 22, 2008 at 2:22 PM, Aaron Stepp wrote:
> Hi all:
>
> I'm new to python and trying to save time and code by iterating through list
> initializations as well as the assignments. I have the following code:
>
> import random
> from rtcmix import *
> from chimes_source import *
> from rhy
Hi all:
I'm new to python and trying to save time and code by iterating
through list initializations as well as the assignments. I have the
following code:
import random
from rtcmix import *
from chimes_source import *
from rhythmblock import *
from pitchblock import *
indexrand = random.
17 matches
Mail list logo