finding the right data structure...?
David Hoare
dave at lifetimeaddress.com
Thu Jun 10 18:28:30 EDT 2004
Hi all...
I'm a python newbie, migrating from a fair bit of VB experience.
I have an application in VB that I was using as a sample to 're-create'
it using python. It involved storing information about sound and light
cues (this was for a lighting / sound theater controller).
The data was stored like this:
- a custom 'type' called lightCue which looked like this:
> Type lightCue
> Name As String 'optional short name
> Description As String 'optional longer description
> CueLine As String 'optional line in script where cue occurs
> upTime As Single 'time for lights fading UP
> downTime As Single 'time for lights fading down
> chanLevel(0 To maxChan) As Single 'stored intensity level (0 to 100) for each channel on the lighting console
> End Type
I then created an array...
dim lq(1 to 200) as lightCue
...allowing me to iterate through the list of cues for any information I
needed
I am struggling to come up with a similar (in function) way to do this
in Python. Any ideas? I think I understand about classes, but then I
need to 'name' each instance of that class when they are created, don't I?
Thanks for your guidance!
David Hoare
dave at lifetimeaddress.com
More information about the Python-list
mailing list