Write a list of Complex Numbers as Binary Data
<p>I'm trying to output some data from a python script to a binary file.</p>

<p>If I have a list of floats I've been using this </p>

<pre><code>out_file = open("filename", "wb")
float_array.array("f", [])
float_array.fromlist(mylist)
float_array.tofile(out_file)
out_file.close()
</code></pre>

<p>This seems to work fine, at least it's resulting in a file with the correct number of bytes.</p>

<p>How can I do the same thing but using a list of complex numbers?</p>

<p>Thanks</p>
