= Ju pyter PydataParis Last Checkpoint: 9 minutes ago (unsaved changes)
File Edit
In [10]:
In [11]:
View Inset Cell Kemel Help
+ % @B 4+ ¥ M B C Coke v | = Cellfoolbar
from scipy.io.wavfile import read
# Not out of core, as you return all data as string (So you should avoid do like this)
datastream as_string = context.data_stream module["1"].getData()
print "Total is %s" % len(datastream as_string)
print type(datastrean_as_string)
Total is 3833000
<type 'str'>
# Now we try with out-of-core!!
stream = context.data_stream module["1"].data
1=6
for chunk in stream.iterate(): # out of core
1 += len(chunk)
print "Total is %s" % 1
print type(stream)
Total is 3833900
<class 'Products.ERPSType.BTreeData.BTreeData’>
[