Markus

find_clutter will not like the bare exceptions so you will need to check that.

Cheers

Nigel

---
Nigel W. Moriarty
Building 33R0349, Molecular Biophysics and Integrated Bioimaging
Lawrence Berkeley National Laboratory
Berkeley, CA 94720-8235
Phone : 510-486-5709     Email : NWMoriarty@LBL.gov
Fax   : 510-486-5909       Web  : CCI.LBL.gov

On Fri, Sep 23, 2016 at 9:33 AM, Nicholas Sauter <nksauter@lbl.gov> wrote:
Seems like a good idea generally.
Nick

Nicholas K. Sauter, Ph. D.
Computer Staff Scientist, Molecular Biophysics and Integrated Bioimaging Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd., Bldg. 33R0345
Berkeley, CA 94720
(510) 486-5713

On Fri, Sep 23, 2016 at 9:31 AM, <markus.gerstel@diamond.ac.uk> wrote:
Hi everyone,

I note that we are using "import pickle" on some 57 occasions.
Is there a particular reason we don't import cPickle? For example:

--- libtbx/env_config.py        (revision 25451)
+++ libtbx/env_config.py        (working copy)
@@ -7,7 +7,10 @@
 from libtbx import adopt_init_args
 import platform
 import shutil
-import pickle
+try:
+  import cPickle as pickle
+except:
+  import pickle
 from cStringIO import StringIO
 import re
 import sys, os

This should still work on all systems without issue. According to python docs the only difference is that cPickle can't be subclassed.
If it's alright with you I would go through those imports and update them to use cPickle where possible.

-Markus

--
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.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
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.
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


_______________________________________________
cctbxbb mailing list
cctbxbb@phenix-online.org
http://phenix-online.org/mailman/listinfo/cctbxbb


_______________________________________________
cctbxbb mailing list
cctbxbb@phenix-online.org
http://phenix-online.org/mailman/listinfo/cctbxbb