>
>
> I just have read this webpage about Generate Audio with Python.
> It seem writing by Python 2? Esp. itertools (izip, imap).
> I try to change izip and imap to zip and map, but I get error:
>
> ​​
> beatfreq, amplitude = remainder.split('/')
> ​​
> ValueError: need more than 1 value to unpack
>
> Are there some way to conver it to the code of Python 3?
>
> I'm too anxious to hear the sound from Python though I'm a absolute
> beginner.
>
> Many thanks
>
> Paul Z
>
>
​If you are using Python 3, replace calls to itertools.izip and
itertools.imap with simply "zip" and "map" respectively. Why not just use
Pyton2 instead, as there may be other things that will break.

​beatfreq, amplitude =
> ​​
> remainder.split('/')


​This throwing an exception means there is an issue with the data you are
trying to split, not necessarily a Py2 vs Py3 thing. What string is
assigned `remainder`?

-- 
*Pablo Lucena*
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to