Re: [ccp4bb] Python3 and MTZ

2018-06-08 Thread Bernhard Rupp
I sympathize with George’s thread – all of the little applets on my web site 
which still see 

frequent use are - with exception of the Kernel estimator of Mattprob, where 
Chris

used python libraries – server-side CGIs written in Fortran. There was no java 
etc. then 

and Mosaic was the hot browser…1992 or so

 

Here is how it is done:

http://www.ruppweb.org/Xray/comp/cgi_prog.htm

One for the history books 😊

 

Cheers, BR

From: CCP4 bulletin board  On Behalf Of George Sheldrick
Sent: Friday, June 8, 2018 09:23
To: CCP4BB@JISCMAIL.AC.UK
Subject: Re: [ccp4bb] Python3 and MTZ

 

This discussion has not convinced me to stop using Fortran. FORTRAN66 programs 
such as SHELX76 still compile and run unchanged with modern Fortran compilers, 
though I do use a few useful features introduced in FORTRAN77 and FORTRAN90 
such as character handling and run-time memory allocation. The resulting 
executables also tend to be faster than when Python is used, even when it is 
used to call routines written in C++.

George

 

On 06.06.2018 20:54, Robbie Joosten wrote:

Right you are Kay. It would be very weird to start developing things on Python 
2.7 right now. Its days are numbered: https://pythonclock.org/

 

Cheers,

Robbie

 

Sent from my Windows 10 phone

 


  _  


From: CCP4 bulletin board  <mailto:CCP4BB@JISCMAIL.AC.UK> 
 on behalf of Kay Diederichs  
<mailto:kay.diederi...@uni-konstanz.de> 
Sent: Wednesday, June 6, 2018 8:47:07 PM
To: CCP4BB@JISCMAIL.AC.UK <mailto:CCP4BB@JISCMAIL.AC.UK> 
Subject: Re: [ccp4bb] Python3 and MTZ 

 

Dear Nicolas,

my (our) motivation is purely that when learning Python today, and developing 
something from scratch, Python3 appears like the better choice (compared to 
version 2) - provided that basic crystallographic libraries can be used.

Just a note (for those whose operating system provides only one of the two 
Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
installed in parallel (using "Software Collections"). The user makes a choice 
by setting the PATH variable.

best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  <mailto:nicolas.f...@esrf.fr> 
 wrote:

>Dear Kay,
>
>depending of the motivation to develop in python3 (could be due to an OS
>using python3 by default or you really prefer to work with python3). If
>it's due to the OS, a possible strategy is to use virtualenv
>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>if python3 is the default version for the OS. It exist probably other
>method to have a contain installation of python2 with all the library needs.
>
>I used this strategy (virtualenv) to install ccp4 (with the installer
>which needed python2) on a manjaro linux (Arch based) running python3
>and that works very well.
>
>Nicolas
>
>Nicolas Foos
>PhD
>Structural Biology Group
>European Synchrotron Radiation Facility (E.S.R.F)
>71, avenue des Martyrs
>CS 40220
>38043 GRENOBLE Cedex 9
>+33 (0)6 76 88 14 87
>+33 (0)4 76 88 45 19
>
>On 06/06/2018 14:25, Kay Diederichs wrote:
>> Dear all,
>>
>> I haven't tried to read MTZ files from Python until now, but for a new
>> project in my lab I'd like to do that - and with Python3.
>>
>> Googling around, it seems that iotbx from cctbx is not (yet)
>> Python3-compatible.
>>
>> So, what are my options?
>>
>> thanks,
>>
>> Kay
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB 
><https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1> &A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB 
<https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1> &A=1

 

  _  

To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB 
<https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1> &A=1 





-- 
Prof. George M. Sheldrick FRS
Dept. Structural Chemistry, 
University of Goettingen,
Tammannstr. 4,
D37077 Goettingen, Germany
Tel. +49-551-39-33021 or +49-5594-227312
 

 

  _  

To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB 
<https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1> &A=1 




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-08 Thread George Sheldrick
This discussion has not convinced me to stop using Fortran. FORTRAN66 
programs such as SHELX76 still compile and run unchanged with modern 
Fortran compilers, though I do use a few useful features introduced in 
FORTRAN77 and FORTRAN90 such as character handling and run-time memory 
allocation. The resulting executables also tend to be faster than when 
Python is used, even when it is used to call routines written in C++.


George


On 06.06.2018 20:54, Robbie Joosten wrote:


Right you are Kay. It would be very weird to start developing things 
on Python 2.7 right now. Its days are numbered: https://pythonclock.org/


Cheers,

Robbie

Sent from my Windows 10 phone


*From:* CCP4 bulletin board  on behalf of Kay 
Diederichs 

*Sent:* Wednesday, June 6, 2018 8:47:07 PM
*To:* CCP4BB@JISCMAIL.AC.UK
*Subject:* Re: [ccp4bb] Python3 and MTZ
Dear Nicolas,

my (our) motivation is purely that when learning Python today, and 
developing something from scratch, Python3 appears like the better 
choice (compared to version 2) - provided that basic crystallographic 
libraries can be used.


Just a note (for those whose operating system provides only one of the 
two Python flavours): RHEL7 has Python2 as system library, but Python3 
can be installed in parallel (using "Software Collections"). The user 
makes a choice by setting the PATH variable.


best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  
wrote:


>Dear Kay,
>
>depending of the motivation to develop in python3 (could be due to an OS
>using python3 by default or you really prefer to work with python3). If
>it's due to the OS, a possible strategy is to use virtualenv
>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>if python3 is the default version for the OS. It exist probably other
>method to have a contain installation of python2 with all the library 
needs.

>
>I used this strategy (virtualenv) to install ccp4 (with the installer
>which needed python2) on a manjaro linux (Arch based) running python3
>and that works very well.
>
>Nicolas
>
>Nicolas Foos
>PhD
>Structural Biology Group
>European Synchrotron Radiation Facility (E.S.R.F)
>71, avenue des Martyrs
>CS 40220
>38043 GRENOBLE Cedex 9
>+33 (0)6 76 88 14 87
>+33 (0)4 76 88 45 19
>
>On 06/06/2018 14:25, Kay Diederichs wrote:
>> Dear all,
>>
>> I haven't tried to read MTZ files from Python until now, but for a new
>> project in my lab I'd like to do that - and with Python3.
>>
>> Googling around, it seems that iotbx from cctbx is not (yet)
>> Python3-compatible.
>>
>> So, what are my options?
>>
>> thanks,
>>
>> Kay
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



--
Prof. George M. Sheldrick FRS
Dept. Structural Chemistry,
University of Goettingen,
Tammannstr. 4,
D37077 Goettingen, Germany
Tel. +49-551-39-33021 or +49-5594-227312




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Markus Gerstel
On 7 June 2018 at 17:55, Ethan Merritt  wrote:

> My basic concern is that python language development has broken existing
> code in the past. Frequently.  They feel free to change things at any
> point,
> even fundamental things like the meaning of the arithmetic operation
> "divide".
> You may be perfectly happy with the current state of the python 3 language,
> but based on past history that state will change and change again and
> sooner
> or later your current code will stop working.  My concern is not the
> state of the language at any given point in time, but the fact that it
> has been unstable for the past two decades and the worry that this
> instability
> will continue into the future.
>

The division example was in my opinion handled rather well, as the default
behaviour was consistent in Python 2 and is consistent within Python 3, but
different between the two.
If you wanted the new (3) behaviour in the old (2) Python you would
declare *from
__future__ import division *at the top of your file, and you can migrate
one file at a time. The default Python 2.7 behaviour is the same as it was
in Python 1.0.

I gather that one cluster of recent breakage is incompatible changes to
> text handling.  I cannot speak to this issue from personal experience,
> but here is a pointer to recent complaints/arguments/counter-arguments.
>   https://lwn.net/Articles/741176/


Unicode is difficult in any language. (pun possibly intended)

It is a big thing for any 2->3 migration as you have to consciously decide
what is text and what is data and how you handle the boundaries.

I kind of agree with all of those points.
> The sticky point is if you are likely to be one of the people on the
> receiving end of that nagging.
>

I am on both sides of this argument. I try to drive Python 3 compatibility
for DIALS, which involves nagging people responsible for upstream packages
that we rely on.
However, you will help me by nagging me, because then I can point other
developers to users who want this. Otherwise the whole migration thing can
look like an academic exercise.
So please do nag.
(I don't want to end up at *another* cliff edge in 2020, having just gone
over the one in 2019.)

-Markus



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Peter Keller

On 07/06/18 17:55, Ethan Merritt wrote:

I gather that one cluster of recent breakage is incompatible changes to
text handling.  I cannot speak to this issue from personal experience,
but here is a pointer to recent complaints/arguments/counter-arguments.
   https://lwn.net/Articles/741176/


I'm not going to take sides in the Python 2 vs. 3 issue, or comment on 
how well the transition between the two is being handled (these days, I 
rarely code in Python). However this sentence from the lwn.net article:


This change could, of course, cause problems for those who are actually expecting (and wanting) to get ASCII-only behavior. 


reminds me for just how long arguments about character data have been 
going on. Also how strongly held people's opinions about it are. Here is 
what Joel Spolsky had to say back in 2003:


https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

TL;DR?


You can no longer stick your head in the sand and pretend that “plain” text is 
ASCII.

There Ain’t No Such Thing As Plain Text.


If you disagree with Joel Spolsky about this, flame him, not me ;-)

Regards,
Peter.

--
Peter Keller Tel.: +44 (0)1223 353033
Global Phasing Ltd., Fax.: +44 (0)1223 366889
Sheraton House,
Castle Park,
Cambridge CB3 0AX
United Kingdom



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Ethan Merritt
On Thursday, 07 June 2018 16:55:55 Markus Gerstel wrote:
> On 6 June 2018 at 20:28, Ethan Merritt  wrote:
> 
> > On Wednesday, 06 June 2018 18:54:32 Robbie Joosten wrote:
> > > Right you are Kay. It would be very weird to start developing things on
> > Python 2.7 right now. Its days are numbered: https://pythonclock.org/
> >
> > I would take a contrarian view.
> > Given the instability of python development, the promise to leave version
> > 2.7
> > alone makes it more desirable than the current ever-changing version.
> > You can be reasonably sure that anything you write for 2.7 will continue
> > to work, since they won't change the 2.7 infrastructure underneath you.
> >
> > But in truth I would recommend staying away from python for new projects
> > altogether, precisely because it is continually unstable.  The python
> > development philosophy places low priority on backwards-compatibility.
> > Combined with the explicit philosophy that python should only support one
> > way of accomplishing any given task, that is a recipe for frequent and
> > continual breakage.
> >
> > Here's an essay from a few years back that I think is still apposite.
> > https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-
> > python-3/
> 
> 
> Your point of view may be valid in that Python 2 -> 3 breaks existing code.
> However you sound like you mean 3.3 -> 3.4 -> 3.5 -> 3.6 -> 3.7 would be an
> issue, and I think that is a rarely argued view.
> I certainly can't find anything in the essay backing this up.

My basic concern is that python language development has broken existing
code in the past. Frequently.  They feel free to change things at any point,
even fundamental things like the meaning of the arithmetic operation "divide".  
You may be perfectly happy with the current state of the python 3 language,
but based on past history that state will change and change again and sooner
or later your current code will stop working.  My concern is not the
state of the language at any given point in time, but the fact that it
has been unstable for the past two decades and the worry that this instability
will continue into the future.

I gather that one cluster of recent breakage is incompatible changes to
text handling.  I cannot speak to this issue from personal experience,
but here is a pointer to recent complaints/arguments/counter-arguments.
  https://lwn.net/Articles/741176/

> 
> For what it's worth, in my opinion:
> If you are new to Python - learn 3.
> If you are using Python2/3 compatible libaries - learn 3 and use the
> libraries from there.
> If you are using libraries that are not yet Python3 compatible - well then
> you have to use Python2 and please nag the developers to make it Python3
> compatible.

I kind of agree with all of those points.
The sticky point is if you are likely to be one of the people on the
receiving end of that nagging.

I.e. the advice to a new user may be different from the advice to
a developer embarking on a new project.

Ethan

> On 7 June 2018 at 11:43, Marcin Wojdyr  wrote:
> 
> > In other words, it's learning both Python2 and Python3 and using the
> > subset of the language that works with both interpreters.
> >
> 
> You only have to care about making your code 2/3 compatible if you are
> writing a library that someone else will import, ie. if you publish on pypi
> or elsewhere.
> Otherwise - as a newcomer - definitely do not bother with Python 2 and go
> straight to Python 3 only.
> 
> -Markus

-- 
Ethan A Merritt, Dept of Biochemistry
Biomolecular Structure Center,  K-428 Health Sciences Bldg
MS 357742,   University of Washington, Seattle 98195-7742



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Markus Gerstel
On 6 June 2018 at 20:28, Ethan Merritt  wrote:

> On Wednesday, 06 June 2018 18:54:32 Robbie Joosten wrote:
> > Right you are Kay. It would be very weird to start developing things on
> Python 2.7 right now. Its days are numbered: https://pythonclock.org/
>
> I would take a contrarian view.
> Given the instability of python development, the promise to leave version
> 2.7
> alone makes it more desirable than the current ever-changing version.
> You can be reasonably sure that anything you write for 2.7 will continue
> to work, since they won't change the 2.7 infrastructure underneath you.
>
> But in truth I would recommend staying away from python for new projects
> altogether, precisely because it is continually unstable.  The python
> development philosophy places low priority on backwards-compatibility.
> Combined with the explicit philosophy that python should only support one
> way of accomplishing any given task, that is a recipe for frequent and
> continual breakage.
>
> Here's an essay from a few years back that I think is still apposite.
> https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-
> python-3/


Your point of view may be valid in that Python 2 -> 3 breaks existing code.
However you sound like you mean 3.3 -> 3.4 -> 3.5 -> 3.6 -> 3.7 would be an
issue, and I think that is a rarely argued view.
I certainly can't find anything in the essay backing this up.

For what it's worth, in my opinion:
If you are new to Python - learn 3.
If you are using Python2/3 compatible libaries - learn 3 and use the
libraries from there.
If you are using libraries that are not yet Python3 compatible - well then
you have to use Python2 and please nag the developers to make it Python3
compatible.

On 7 June 2018 at 11:43, Marcin Wojdyr  wrote:

> In other words, it's learning both Python2 and Python3 and using the
> subset of the language that works with both interpreters.
>

You only have to care about making your code 2/3 compatible if you are
writing a library that someone else will import, ie. if you publish on pypi
or elsewhere.
Otherwise - as a newcomer - definitely do not bother with Python 2 and go
straight to Python 3 only.

-Markus



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread graeme.win...@diamond.ac.uk
Hi Marcin,

I do not think that this is an unreasonable burden, given what you gain as a 
result of it - the languages are probably >> 90% identical, and you get access 
to a bucket full of tools by staying in the common ground area. I appreciate 
that rewriting cctbx could be a fun challenge, but I for one don’t have time to 
do so ;-) 

Kay, quite by chance I find myself writing a jiffy script which compares 
scaled-but-unmerged data with scaled and merged data, to look at the 
distributions about the mean value - clearly I could merge the data myself 
using cctbx tools, but the aim was to compare the reflections files as they 
came from aimless - anyway, this computes a “z” score for each reflection i.e. 
(i - ) / sig(i) for each observation & forms a histogram:

20 ish lines of code and a few minutes later:



from __future__ import print_function, division

from iotbx import mtz
from scitbx.array_family import flex
import sys

merged = mtz.object(sys.argv[1])
unmerged = mtz.object(sys.argv[2])

unique_indices = merged.extract_miller_indices()
all_indices = unmerged.extract_miller_indices()
imean = merged.extract_observations('IMEAN', 'SIGIMEAN')
iuniq = unmerged.extract_observations('I', 'SIGI')

z = flex.double(iuniq.data.size(), 0.0)

for index, i in zip(unique_indices, imean.data):
  sel = (all_indices == index)
  z.set_selected(sel, (iuniq.data - i) / iuniq.sigmas)

h = flex.histogram(z, data_min=-5, data_max=5, n_slots=100)

for c, v in zip(h.slot_centers(), h.slots()):
  print(c, v)



thought it may help the discussion. 

best wishes Graeme


> On 7 Jun 2018, at 11:43, Marcin Wojdyr  wrote:
> 
> On 7 June 2018 at 05:29, graeme.win...@diamond.ac.uk
>  wrote:
>> Dear Kay,
>> 
>> Yes, it’s writing code to be compatible with Python2 and Python3 - in real 
>> life they are largely idiomatically similar, with well documented 
>> differences e.g.
> 
> In other words, it's learning both Python2 and Python3 and using the
> subset of the language that works with both interpreters.
> It's an extra burden and if one is learning Python choosing any of the
> two versions will make it easier.


-- 
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




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Rasmus Fogh

Dear Kay,

Plus there is one Python-3-only feature that is a really big help for 
any large and complex project:
Type annotations lets you specify is a simple way the type of function 
parameters, both for documentation and so that your IDE can flag cases 
where you misuse the parameters.


But of course it does not help if yuo depend on code that is only 
available in Python 2.


Yours,

Rasmus

On 07/06/18 11:43, Marcin Wojdyr wrote:

On 7 June 2018 at 05:29, graeme.win...@diamond.ac.uk
 wrote:

Dear Kay,

Yes, it’s writing code to be compatible with Python2 and Python3 - in real life 
they are largely idiomatically similar, with well documented differences e.g.


In other words, it's learning both Python2 and Python3 and using the
subset of the language that works with both interpreters.
It's an extra burden and if one is learning Python choosing any of the
two versions will make it easier.



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1





--
Rasmus H. Fogh   Tel.: +44 (0)1223 353033
Global Phasing Ltd., Fax.: +44 (0)1223 366889
Sheraton House,
Castle Park,
Cambridge CB3 0AX
United Kingdom



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-07 Thread Marcin Wojdyr
On 7 June 2018 at 05:29, graeme.win...@diamond.ac.uk
 wrote:
> Dear Kay,
>
> Yes, it’s writing code to be compatible with Python2 and Python3 - in real 
> life they are largely idiomatically similar, with well documented differences 
> e.g.

In other words, it's learning both Python2 and Python3 and using the
subset of the language that works with both interpreters.
It's an extra burden and if one is learning Python choosing any of the
two versions will make it easier.



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread graeme.win...@diamond.ac.uk
Dear Kay,

Yes, it’s writing code to be compatible with Python2 and Python3 - in real life 
they are largely idiomatically similar, with well documented differences e.g.

http://python-future.org/compatible_idioms.html

Most of this will not affect you unless you are doing a pretty major project...

Re: cctbx -> python3 - there is a roadmap at

https://github.com/cctbx/cctbx_project/wiki/Python-3-roadmap

Unlike e.g. FORTRAN where you can still compile 40 year old code, the choice 
was made in Python to fix some things which were not “right” and make Python3 a 
different dialect - since Python3 is now a decade old and only really now 
gaining traction a lot of people have found this challenging. That said, cctbx 
is > 15 years old now so has seen some changes too..

In terms of learning Python, obviously Python3 _syntax_ is the way forward - my 
daughter learns this at school! - but using Python2 _compatible_ code as per 
the idioms above will make life easier in the short term, and will allow use of 
cctbx… adding

from __future__ import division, print_function

to the very top of your source files will help this

Best wishes Graeme

On 6 Jun 2018, at 21:36, Kay Diederichs 
mailto:kay.diederi...@uni-konstanz.de>> wrote:

Dear Graeme,

that sounded to me at first like xia2 and DIALS could be written in Python3 and 
still use cctbx. But thinking about it, this cannot be true; once you run your 
code, you have to run either the Python2 or the Python3 interpreter. And if you 
try to use Python3, it will not correctly run cctbx.

I think what you do in xia2 and DIALS is write code that now runs under 
Python2, but will/would still work if run under Python3 - but this requires 
converting cctbx to Python3 (which, as I saw on some webpage, is a goal for 
2018 IIUC).

Right? Pls ignore my ignorance; I'm a beginner in this area ...

best,

Kay

On Wed, 6 Jun 2018 20:22:10 +, 
graeme.win...@diamond.ac.uk<mailto:graeme.win...@diamond.ac.uk> 
mailto:graeme.win...@diamond.ac.uk>> wrote:

Dear Kay,


While I am obviously biased, I have to say that using cctbx (even if it is 
"old" Python) has a lot to be said for it - there are a lot of tools in there 
which are useful once you have read the reflection data & want to do 
crystallography.


Re: Python 3: within xia2, DIALS and other cctbx-derived projects we have moved 
to writing Python which is compatible with 2.7.x and 3.x language standards - 
by and large it is not a hardship and means you can write code today which will 
continue to be useful. There is a wider push to migrate cctbx to 2.7.x and 3.x 
compatibility however it is a large code base and it's a fair amount of work. 
There's more to it than just adding brackets after print though :-)


Best wishes Graeme


From: CCP4 bulletin board mailto:CCP4BB@JISCMAIL.AC.UK>> 
on behalf of Kay Diederichs 
mailto:kay.diederi...@uni-konstanz.de>>
Sent: 06 June 2018 19:47:07
To: ccp4bb
Subject: Re: [ccp4bb] Python3 and MTZ

Dear Nicolas,

my (our) motivation is purely that when learning Python today, and developing 
something from scratch, Python3 appears like the better choice (compared to 
version 2) - provided that basic crystallographic libraries can be used.

Just a note (for those whose operating system provides only one of the two 
Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
installed in parallel (using "Software Collections"). The user makes a choice 
by setting the PATH variable.

best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS 
mailto:nicolas.f...@esrf.fr>> wrote:

Dear Kay,

depending of the motivation to develop in python3 (could be due to an OS
using python3 by default or you really prefer to work with python3). If
it's due to the OS, a possible strategy is to use virtualenv
(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
if python3 is the default version for the OS. It exist probably other
method to have a contain installation of python2 with all the library needs.

I used this strategy (virtualenv) to install ccp4 (with the installer
which needed python2) on a manjaro linux (Arch based) running python3
and that works very well.

Nicolas

Nicolas Foos
PhD
Structural Biology Group
European Synchrotron Radiation Facility (E.S.R.F)
71, avenue des Martyrs
CS 40220
38043 GRENOBLE Cedex 9
+33 (0)6 76 88 14 87
+33 (0)4 76 88 45 19

On 06/06/2018 14:25, Kay Diederichs wrote:
Dear all,

I haven't tried to read MTZ files from Python until now, but for a new
project in my lab I'd like to do that - and with Python3.

Googling around, it seems that iotbx from cctbx is not (yet)
Python3-compatible.

So, what are my options?

thanks,

Kay



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin

Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Kay Diederichs
Hi Ethan,

the problem is that most tutorials or courses are Python3 nowadays. I installed 
the App "Sololearn" 
(https://play.google.com/store/apps/details?id=com.sololearn; thanks Isabel!) 
and am fascinated; this is really fun! But it is Python3. 

https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-python-3/
 states in the 2016 header: "Short version: just use Python 3. There's almost 
no reason not to any more." So the problem boils down to the word "almost".

best,

Kay


On Wed, 6 Jun 2018 12:28:20 -0700, Ethan Merritt  
wrote:

>On Wednesday, 06 June 2018 18:54:32 Robbie Joosten wrote:
>> Right you are Kay. It would be very weird to start developing things on 
>> Python 2.7 right now. Its days are numbered: https://pythonclock.org/
>
>I would take a contrarian view.
>Given the instability of python development, the promise to leave version 2.7
>alone makes it more desirable than the current ever-changing version.
>You can be reasonably sure that anything you write for 2.7 will continue
>to work, since they won't change the 2.7 infrastructure underneath you.
>
>But in truth I would recommend staying away from python for new projects
>altogether, precisely because it is continually unstable.  The python
>development philosophy places low priority on backwards-compatibility.
>Combined with the explicit philosophy that python should only support one
>way of accomplishing any given task, that is a recipe for frequent and
>continual breakage.
>
>Here's an essay from a few years back that I think is still apposite.
>https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-python-3/
>
>
>   Ethan
>
>
>>
>>
>> Cheers,
>>
>> Robbie
>>
>>
>>
>> Sent from my Windows 10 phone
>>
>>
>>
>> ________
>> From: CCP4 bulletin board  on behalf of Kay 
>> Diederichs 
>> Sent: Wednesday, June 6, 2018 8:47:07 PM
>> To: CCP4BB@JISCMAIL.AC.UK
>> Subject: Re: [ccp4bb] Python3 and MTZ
>>
>> Dear Nicolas,
>>
>> my (our) motivation is purely that when learning Python today, and 
>> developing something from scratch, Python3 appears like the better choice 
>> (compared to version 2) - provided that basic crystallographic libraries can 
>> be used.
>>
>> Just a note (for those whose operating system provides only one of the two 
>> Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
>> installed in parallel (using "Software Collections"). The user makes a 
>> choice by setting the PATH variable.
>>
>> best,
>>
>> Kay
>>
>> On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:
>>
>> >Dear Kay,
>> >
>> >depending of the motivation to develop in python3 (could be due to an OS
>> >using python3 by default or you really prefer to work with python3). If
>> >it's due to the OS, a possible strategy is to use virtualenv
>> >(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>> >if python3 is the default version for the OS. It exist probably other
>> >method to have a contain installation of python2 with all the library needs.
>> >
>> >I used this strategy (virtualenv) to install ccp4 (with the installer
>> >which needed python2) on a manjaro linux (Arch based) running python3
>> >and that works very well.
>> >
>> >Nicolas
>> >
>> >Nicolas Foos
>> >PhD
>> >Structural Biology Group
>> >European Synchrotron Radiation Facility (E.S.R.F)
>> >71, avenue des Martyrs
>> >CS 40220
>> >38043 GRENOBLE Cedex 9
>> >+33 (0)6 76 88 14 87
>> >+33 (0)4 76 88 45 19
>> >
>> >On 06/06/2018 14:25, Kay Diederichs wrote:
>> >> Dear all,
>> >>
>> >> I haven't tried to read MTZ files from Python until now, but for a new
>> >> project in my lab I'd like to do that - and with Python3.
>> >>
>> >> Googling around, it seems that iotbx from cctbx is not (yet)
>> >> Python3-compatible.
>> >>
>> >> So, what are my options?
>> >>
>> >> thanks,
>> >>
>> >> Kay
>> >
>> >
>> >
>> >To unsubscribe from the CCP4BB list, click the following link:
>> >https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>
>> 
>&

Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Kay Diederichs
Dear Graeme,

that sounded to me at first like xia2 and DIALS could be written in Python3 and 
still use cctbx. But thinking about it, this cannot be true; once you run your 
code, you have to run either the Python2 or the Python3 interpreter. And if you 
try to use Python3, it will not correctly run cctbx. 

I think what you do in xia2 and DIALS is write code that now runs under 
Python2, but will/would still work if run under Python3 - but this requires 
converting cctbx to Python3 (which, as I saw on some webpage, is a goal for 
2018 IIUC).

Right? Pls ignore my ignorance; I'm a beginner in this area ...

best,

Kay

On Wed, 6 Jun 2018 20:22:10 +, graeme.win...@diamond.ac.uk 
 wrote:

>Dear Kay,
>
>
>While I am obviously biased, I have to say that using cctbx (even if it is 
>"old" Python) has a lot to be said for it - there are a lot of tools in there 
>which are useful once you have read the reflection data & want to do 
>crystallography.
>
>
>Re: Python 3: within xia2, DIALS and other cctbx-derived projects we have 
>moved to writing Python which is compatible with 2.7.x and 3.x language 
>standards - by and large it is not a hardship and means you can write code 
>today which will continue to be useful. There is a wider push to migrate cctbx 
>to 2.7.x and 3.x compatibility however it is a large code base and it's a fair 
>amount of work. There's more to it than just adding brackets after print 
>though :-)
>
>
>Best wishes Graeme
>
>
>From: CCP4 bulletin board  on behalf of Kay Diederichs 
>
>Sent: 06 June 2018 19:47:07
>To: ccp4bb
>Subject: Re: [ccp4bb] Python3 and MTZ
>
>Dear Nicolas,
>
>my (our) motivation is purely that when learning Python today, and developing 
>something from scratch, Python3 appears like the better choice (compared to 
>version 2) - provided that basic crystallographic libraries can be used.
>
>Just a note (for those whose operating system provides only one of the two 
>Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
>installed in parallel (using "Software Collections"). The user makes a choice 
>by setting the PATH variable.
>
>best,
>
>Kay
>
>On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:
>
>>Dear Kay,
>>
>>depending of the motivation to develop in python3 (could be due to an OS
>>using python3 by default or you really prefer to work with python3). If
>>it's due to the OS, a possible strategy is to use virtualenv
>>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>>if python3 is the default version for the OS. It exist probably other
>>method to have a contain installation of python2 with all the library needs.
>>
>>I used this strategy (virtualenv) to install ccp4 (with the installer
>>which needed python2) on a manjaro linux (Arch based) running python3
>>and that works very well.
>>
>>Nicolas
>>
>>Nicolas Foos
>>PhD
>>Structural Biology Group
>>European Synchrotron Radiation Facility (E.S.R.F)
>>71, avenue des Martyrs
>>CS 40220
>>38043 GRENOBLE Cedex 9
>>+33 (0)6 76 88 14 87
>>+33 (0)4 76 88 45 19
>>
>>On 06/06/2018 14:25, Kay Diederichs wrote:
>>> Dear all,
>>>
>>> I haven't tried to read MTZ files from Python until now, but for a new
>>> project in my lab I'd like to do that - and with Python3.
>>>
>>> Googling around, it seems that iotbx from cctbx is not (yet)
>>> Python3-compatible.
>>>
>>> So, what are my options?
>>>
>>> thanks,
>>>
>>> Kay
>>
>>
>>
>>To unsubscribe from the CCP4BB list, click the following link:
>>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>
>-- 
>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 attachme

Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Paul Adams
Dear Kay,

  I’m even more biased that Graeme of course, but I agree completely with what 
he says. You can write code that is compatible with both 2.7 and 3 and easily 
make use of the libraries available. Cctbx, and Phenix, are moving to python 3 
compatibility in the not so distant future.

  Cheers,
Paul 

> On Jun 6, 2018, at 4:22 PM, graeme.win...@diamond.ac.uk 
>  wrote:
> 
> Dear Kay,
> 
> 
> While I am obviously biased, I have to say that using cctbx (even if it is 
> "old" Python) has a lot to be said for it - there are a lot of tools in there 
> which are useful once you have read the reflection data & want to do 
> crystallography.
> 
> 
> Re: Python 3: within xia2, DIALS and other cctbx-derived projects we have 
> moved to writing Python which is compatible with 2.7.x and 3.x language 
> standards - by and large it is not a hardship and means you can write code 
> today which will continue to be useful. There is a wider push to migrate 
> cctbx to 2.7.x and 3.x compatibility however it is a large code base and it's 
> a fair amount of work. There's more to it than just adding brackets after 
> print though :-)
> 
> 
> Best wishes Graeme
> 
> 
> From: CCP4 bulletin board  on behalf of Kay Diederichs 
> 
> Sent: 06 June 2018 19:47:07
> To: ccp4bb
> Subject: Re: [ccp4bb] Python3 and MTZ
> 
> Dear Nicolas,
> 
> my (our) motivation is purely that when learning Python today, and developing 
> something from scratch, Python3 appears like the better choice (compared to 
> version 2) - provided that basic crystallographic libraries can be used.
> 
> Just a note (for those whose operating system provides only one of the two 
> Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
> installed in parallel (using "Software Collections"). The user makes a choice 
> by setting the PATH variable.
> 
> best,
> 
> Kay
> 
> On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:
> 
>> Dear Kay,
>> 
>> depending of the motivation to develop in python3 (could be due to an OS
>> using python3 by default or you really prefer to work with python3). If
>> it's due to the OS, a possible strategy is to use virtualenv
>> (https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>> if python3 is the default version for the OS. It exist probably other
>> method to have a contain installation of python2 with all the library needs.
>> 
>> I used this strategy (virtualenv) to install ccp4 (with the installer
>> which needed python2) on a manjaro linux (Arch based) running python3
>> and that works very well.
>> 
>> Nicolas
>> 
>> Nicolas Foos
>> PhD
>> Structural Biology Group
>> European Synchrotron Radiation Facility (E.S.R.F)
>> 71, avenue des Martyrs
>> CS 40220
>> 38043 GRENOBLE Cedex 9
>> +33 (0)6 76 88 14 87
>> +33 (0)4 76 88 45 19
>> 
>> On 06/06/2018 14:25, Kay Diederichs wrote:
>>> Dear all,
>>> 
>>> I haven't tried to read MTZ files from Python until now, but for a new
>>> project in my lab I'd like to do that - and with Python3.
>>> 
>>> Googling around, it seems that iotbx from cctbx is not (yet)
>>> Python3-compatible.
>>> 
>>> So, what are my options?
>>> 
>>> thanks,
>>> 
>>> Kay
>> 
>> 
>> 
>> To unsubscribe from the CCP4BB list, click the following link:
>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
> 
> 
> 
> To unsubscribe from the CCP4BB list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
> 
> -- 
> 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

Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread graeme.win...@diamond.ac.uk
Dear Kay,


While I am obviously biased, I have to say that using cctbx (even if it is 
"old" Python) has a lot to be said for it - there are a lot of tools in there 
which are useful once you have read the reflection data & want to do 
crystallography.


Re: Python 3: within xia2, DIALS and other cctbx-derived projects we have moved 
to writing Python which is compatible with 2.7.x and 3.x language standards - 
by and large it is not a hardship and means you can write code today which will 
continue to be useful. There is a wider push to migrate cctbx to 2.7.x and 3.x 
compatibility however it is a large code base and it's a fair amount of work. 
There's more to it than just adding brackets after print though :-)


Best wishes Graeme


From: CCP4 bulletin board  on behalf of Kay Diederichs 

Sent: 06 June 2018 19:47:07
To: ccp4bb
Subject: Re: [ccp4bb] Python3 and MTZ

Dear Nicolas,

my (our) motivation is purely that when learning Python today, and developing 
something from scratch, Python3 appears like the better choice (compared to 
version 2) - provided that basic crystallographic libraries can be used.

Just a note (for those whose operating system provides only one of the two 
Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
installed in parallel (using "Software Collections"). The user makes a choice 
by setting the PATH variable.

best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:

>Dear Kay,
>
>depending of the motivation to develop in python3 (could be due to an OS
>using python3 by default or you really prefer to work with python3). If
>it's due to the OS, a possible strategy is to use virtualenv
>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>if python3 is the default version for the OS. It exist probably other
>method to have a contain installation of python2 with all the library needs.
>
>I used this strategy (virtualenv) to install ccp4 (with the installer
>which needed python2) on a manjaro linux (Arch based) running python3
>and that works very well.
>
>Nicolas
>
>Nicolas Foos
>PhD
>Structural Biology Group
>European Synchrotron Radiation Facility (E.S.R.F)
>71, avenue des Martyrs
>CS 40220
>38043 GRENOBLE Cedex 9
>+33 (0)6 76 88 14 87
>+33 (0)4 76 88 45 19
>
>On 06/06/2018 14:25, Kay Diederichs wrote:
>> Dear all,
>>
>> I haven't tried to read MTZ files from Python until now, but for a new
>> project in my lab I'd like to do that - and with Python3.
>>
>> Googling around, it seems that iotbx from cctbx is not (yet)
>> Python3-compatible.
>>
>> So, what are my options?
>>
>> thanks,
>>
>> Kay
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1

-- 
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




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Ethan Merritt
On Wednesday, 06 June 2018 18:54:32 Robbie Joosten wrote:
> Right you are Kay. It would be very weird to start developing things on 
> Python 2.7 right now. Its days are numbered: https://pythonclock.org/

I would take a contrarian view.
Given the instability of python development, the promise to leave version 2.7
alone makes it more desirable than the current ever-changing version.
You can be reasonably sure that anything you write for 2.7 will continue
to work, since they won't change the 2.7 infrastructure underneath you.

But in truth I would recommend staying away from python for new projects
altogether, precisely because it is continually unstable.  The python
development philosophy places low priority on backwards-compatibility.
Combined with the explicit philosophy that python should only support one
way of accomplishing any given task, that is a recipe for frequent and
continual breakage.  

Here's an essay from a few years back that I think is still apposite.
https://jakevdp.github.io/blog/2013/01/03/will-scientists-ever-move-to-python-3/


Ethan


> 
> 
> Cheers,
> 
> Robbie
> 
> 
> 
> Sent from my Windows 10 phone
> 
> 
> 
> 
> From: CCP4 bulletin board  on behalf of Kay Diederichs 
> 
> Sent: Wednesday, June 6, 2018 8:47:07 PM
> To: CCP4BB@JISCMAIL.AC.UK
> Subject: Re: [ccp4bb] Python3 and MTZ
> 
> Dear Nicolas,
> 
> my (our) motivation is purely that when learning Python today, and developing 
> something from scratch, Python3 appears like the better choice (compared to 
> version 2) - provided that basic crystallographic libraries can be used.
> 
> Just a note (for those whose operating system provides only one of the two 
> Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
> installed in parallel (using "Software Collections"). The user makes a choice 
> by setting the PATH variable.
> 
> best,
> 
> Kay
> 
> On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:
> 
> >Dear Kay,
> >
> >depending of the motivation to develop in python3 (could be due to an OS
> >using python3 by default or you really prefer to work with python3). If
> >it's due to the OS, a possible strategy is to use virtualenv
> >(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
> >if python3 is the default version for the OS. It exist probably other
> >method to have a contain installation of python2 with all the library needs.
> >
> >I used this strategy (virtualenv) to install ccp4 (with the installer
> >which needed python2) on a manjaro linux (Arch based) running python3
> >and that works very well.
> >
> >Nicolas
> >
> >Nicolas Foos
> >PhD
> >Structural Biology Group
> >European Synchrotron Radiation Facility (E.S.R.F)
> >71, avenue des Martyrs
> >CS 40220
> >38043 GRENOBLE Cedex 9
> >+33 (0)6 76 88 14 87
> >+33 (0)4 76 88 45 19
> >
> >On 06/06/2018 14:25, Kay Diederichs wrote:
> >> Dear all,
> >>
> >> I haven't tried to read MTZ files from Python until now, but for a new
> >> project in my lab I'd like to do that - and with Python3.
> >>
> >> Googling around, it seems that iotbx from cctbx is not (yet)
> >> Python3-compatible.
> >>
> >> So, what are my options?
> >>
> >> thanks,
> >>
> >> Kay
> >
> >
> >
> >To unsubscribe from the CCP4BB list, click the following link:
> >https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
> 
> 
> 
> To unsubscribe from the CCP4BB list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
> 
> 
> 
> To unsubscribe from the CCP4BB list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1

-- 
Ethan A Merritt, Dept of Biochemistry
Biomolecular Structure Center,  K-428 Health Sciences Bldg
MS 357742,   University of Washington, Seattle 98195-7742



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Robbie Joosten
Right you are Kay. It would be very weird to start developing things on Python 
2.7 right now. Its days are numbered: https://pythonclock.org/



Cheers,

Robbie



Sent from my Windows 10 phone




From: CCP4 bulletin board  on behalf of Kay Diederichs 

Sent: Wednesday, June 6, 2018 8:47:07 PM
To: CCP4BB@JISCMAIL.AC.UK
Subject: Re: [ccp4bb] Python3 and MTZ

Dear Nicolas,

my (our) motivation is purely that when learning Python today, and developing 
something from scratch, Python3 appears like the better choice (compared to 
version 2) - provided that basic crystallographic libraries can be used.

Just a note (for those whose operating system provides only one of the two 
Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
installed in parallel (using "Software Collections"). The user makes a choice 
by setting the PATH variable.

best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:

>Dear Kay,
>
>depending of the motivation to develop in python3 (could be due to an OS
>using python3 by default or you really prefer to work with python3). If
>it's due to the OS, a possible strategy is to use virtualenv
>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>if python3 is the default version for the OS. It exist probably other
>method to have a contain installation of python2 with all the library needs.
>
>I used this strategy (virtualenv) to install ccp4 (with the installer
>which needed python2) on a manjaro linux (Arch based) running python3
>and that works very well.
>
>Nicolas
>
>Nicolas Foos
>PhD
>Structural Biology Group
>European Synchrotron Radiation Facility (E.S.R.F)
>71, avenue des Martyrs
>CS 40220
>38043 GRENOBLE Cedex 9
>+33 (0)6 76 88 14 87
>+33 (0)4 76 88 45 19
>
>On 06/06/2018 14:25, Kay Diederichs wrote:
>> Dear all,
>>
>> I haven't tried to read MTZ files from Python until now, but for a new
>> project in my lab I'd like to do that - and with Python3.
>>
>> Googling around, it seems that iotbx from cctbx is not (yet)
>> Python3-compatible.
>>
>> So, what are my options?
>>
>> thanks,
>>
>> Kay
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Kay Diederichs
Dear Nicolas,

my (our) motivation is purely that when learning Python today, and developing 
something from scratch, Python3 appears like the better choice (compared to 
version 2) - provided that basic crystallographic libraries can be used.

Just a note (for those whose operating system provides only one of the two 
Python flavours): RHEL7 has Python2 as system library, but Python3 can be 
installed in parallel (using "Software Collections"). The user makes a choice 
by setting the PATH variable.

best,

Kay

On Wed, 6 Jun 2018 15:43:16 +0200, Nicolas FOOS  wrote:

>Dear Kay,
>
>depending of the motivation to develop in python3 (could be due to an OS
>using python3 by default or you really prefer to work with python3). If
>it's due to the OS, a possible strategy is to use virtualenv
>(https://virtualenv.pypa.io/en/stable/) which let you use python2 even
>if python3 is the default version for the OS. It exist probably other
>method to have a contain installation of python2 with all the library needs.
>
>I used this strategy (virtualenv) to install ccp4 (with the installer
>which needed python2) on a manjaro linux (Arch based) running python3
>and that works very well.
>
>Nicolas
>
>Nicolas Foos
>PhD
>Structural Biology Group
>European Synchrotron Radiation Facility (E.S.R.F)
>71, avenue des Martyrs
>CS 40220
>38043 GRENOBLE Cedex 9
>+33 (0)6 76 88 14 87
>+33 (0)4 76 88 45 19
>
>On 06/06/2018 14:25, Kay Diederichs wrote:
>> Dear all,
>>
>> I haven't tried to read MTZ files from Python until now, but for a new
>> project in my lab I'd like to do that - and with Python3.
>>
>> Googling around, it seems that iotbx from cctbx is not (yet)
>> Python3-compatible.
>>
>> So, what are my options?
>>
>> thanks,
>>
>> Kay
>
>
>
>To unsubscribe from the CCP4BB list, click the following link:
>https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1



To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1


Re: [ccp4bb] Python3 and MTZ

2018-06-06 Thread Nicolas FOOS

Dear Kay,

depending of the motivation to develop in python3 (could be due to an OS 
using python3 by default or you really prefer to work with python3). If 
it's due to the OS, a possible strategy is to use virtualenv 
(https://virtualenv.pypa.io/en/stable/) which let you use python2 even 
if python3 is the default version for the OS. It exist probably other 
method to have a contain installation of python2 with all the library needs.


I used this strategy (virtualenv) to install ccp4 (with the installer 
which needed python2) on a manjaro linux (Arch based) running python3 
and that works very well.


Nicolas

Nicolas Foos
PhD
Structural Biology Group
European Synchrotron Radiation Facility (E.S.R.F)
71, avenue des Martyrs
CS 40220
38043 GRENOBLE Cedex 9
+33 (0)6 76 88 14 87
+33 (0)4 76 88 45 19

On 06/06/2018 14:25, Kay Diederichs wrote:

Dear all,

I haven't tried to read MTZ files from Python until now, but for a new
project in my lab I'd like to do that - and with Python3.

Googling around, it seems that iotbx from cctbx is not (yet)
Python3-compatible.

So, what are my options?

thanks,

Kay




To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1