<div dir="ltr">Seems like a good idea generally.<div>Nick</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Nicholas K. Sauter, Ph. D.<br>Computer Staff Scientist, Molecular Biophysics and Integrated Bioimaging Division<div>Lawrence Berkeley National Laboratory<br>1 Cyclotron Rd., Bldg. 33R0345<br>Berkeley, CA 94720<br>(510) 486-5713<br></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Sep 23, 2016 at 9:31 AM,  <span dir="ltr">&lt;<a href="mailto:markus.gerstel@diamond.ac.uk" target="_blank">markus.gerstel@diamond.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I note that we are using &quot;import pickle&quot; on some 57 occasions.<br>
Is there a particular reason we don&#39;t import cPickle? For example:<br>
<br>
--- libtbx/env_config.py        (revision 25451)<br>
+++ libtbx/env_config.py        (working copy)<br>
@@ -7,7 +7,10 @@<br>
 from libtbx import adopt_init_args<br>
 import platform<br>
 import shutil<br>
-import pickle<br>
+try:<br>
+  import cPickle as pickle<br>
+except:<br>
+  import pickle<br>
 from cStringIO import StringIO<br>
 import re<br>
 import sys, os<br>
<br>
This should still work on all systems without issue. According to python docs the only difference is that cPickle can&#39;t be subclassed.<br>
If it&#39;s alright with you I would go through those imports and update them to use cPickle where possible.<br>
<br>
-Markus<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<br>
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.<br>
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<br>
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<br>
<br>
<br>
______________________________<wbr>_________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/<wbr>mailman/listinfo/cctbxbb</a><br>
</font></span></blockquote></div><br></div>