<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div>If you just want to load the data into python one time, rather than connecting to the file, it would be more handy to paste the cells from the clipboard. </div><div><br></div><div>Here's how I do it on windows:</div><div><br></div><div><br></div><div>from win32clipboard import * </div><div>#("pywin32" module required)</div><div><br></div><div>def pastetable():</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>OpenClipboard()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>try: a=GetClipboardData(13)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>except:</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>CloseClipboard()</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>return None</div><div><span class="Apple-tab-span"
style="white-space:pre">        </span>CloseClipboard()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>a=a.split('\r\n')</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for n, b in enumerate(a):</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>a[n]=b.split('\t')</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>return a</div></td></tr></table><br>
<hr size=1>
À la recherche du cadeau idéal?<a href="http://www.flickr.com/gift/"><b> Offrez Flickr!</b></a>