Re: getting the center of mass of each part of a molecule

2017-05-15 Thread qasimpars
@Cameron: Thanks, I will try what you suggest. I am not sure that I'll tackle it because I am new to python. -- https://mail.python.org/mailman/listinfo/python-list

Re: Overriding methods on a per instance basis

2017-05-15 Thread Nathan Ernst
There is another way to do it, but it's not pretty, and I don't recommend it: >>> class Foo: ... pass ... >>> from functools import partial >>> f = Foo() >>> def hello(self, arg): ... print("hello", arg) ... >>> f.hello = partial(hello, f) >>> f.hello("world") hello world This basically re

Re: How to install Python package from source on Windows

2017-05-15 Thread MRAB
On 2017-05-16 02:19, Deborah Swanson wrote: [snip] I'll accept that, though I still don't quite understand the recent dependence on Visual C++, after Python has been building its releases with the tools you and others mention from the beginning until shortly after the first 3 build was released,

Re: How to install Python package from source on Windows

2017-05-15 Thread eryk sun
On Tue, May 16, 2017 at 12:51 AM, Chris Angelico wrote: > > The Python.org support policy is that Python X.Y will be > supported on Windows Z if and only if Windows Z was supported by > Microsoft as of when Python X.Y.0 was released. Python 3.4 is the last to support XP (2014-04-08 EOL). Python 3

Re: getting the center of mass of each part of a molecule

2017-05-15 Thread jeanbigboute
On Monday, May 15, 2017 at 1:30:05 PM UTC-7, qasi...@gmail.com wrote: > Hi, > > I need to get the center of mass (COM) of each half of the ligand shown in > the figure (https://i.stack.imgur.com/dtdul.png). I get the main COM all the > ligand, lets say it is close to C1 atom. ... I don't quite

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Gregory Ewing wrote, on Monday, May 15, 2017 4:55 PM > > Deborah Swanson wrote: > > It continues to amaze me that Anaconda and Python.org, probably the > > two biggest distributors of official Python builds, are now relying on > > Visual C++. Why can't Python developers write the entire setup an

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Tue, May 16, 2017 at 11:19 AM, Deborah Swanson wrote: > Chris Angelico wrote, on Monday, May 15, 2017 2:58 PM >> You seem to be of the opinion that some day, binary >> executables will be compiled using pure Python code. > > Well, my naive opinion is that they should be. But it was just one > m

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 2:58 PM > > On Tue, May 16, 2017 at 7:01 AM, Deborah Swanson > wrote: > > But I'm a little more mystified that official Python builds are > > leaning on Visual C++ (and that's what the crutch comment was > > primarily aimed at). Perhaps they're jus

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Tue, May 16, 2017 at 9:54 AM, Gregory Ewing wrote: > There's also the fact that Microsoft doesn't make the free > versions of Visual Studio available forever and forbids anyone > else distributing them, so sufficiently old versions are > simply not available to most people. Yes and no. The Pyt

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Nathan Ernst wrote, on Monday, May 15, 2017 2:14 PM Deborah, I get the feeling you don't understand the architecture/implementation of Python. The (C)Python interpreter is written in C. A number of the built-in modules are least partially written in C. As such, C is a natural integration point

Re: How to install Python package from source on Windows

2017-05-15 Thread Gregory Ewing
Deborah Swanson wrote: It continues to amaze me that Anaconda and Python.org, probably the two biggest distributors of official Python builds, are now relying on Visual C++. Why can't Python developers write the entire setup and installation code in Python? The setup and installation code *is*

Re: How to install Python package from source on Windows

2017-05-15 Thread MRAB
On 2017-05-15 21:40, eryk sun wrote: On Mon, May 15, 2017 at 7:43 PM, MRAB wrote: > On 2017-05-15 13:52, eryk sun wrote: >> >> The wheel doesn't need a compiler. It has an ABI tag because it >> already includes the compiled extension module. >> > I used pip to install into Python 3.4 (32-bit) fr

Re: getting the center of mass of each part of a molecule

2017-05-15 Thread Cameron Simpson
On 15May2017 13:29, qasimp...@gmail.com wrote: I need to get the center of mass (COM) of each half of the ligand shown in the figure (https://i.stack.imgur.com/dtdul.png). I get the main COM all the ligand, lets say it is close to C1 atom. In addition to the main COM of all the ligand, I need

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Tue, May 16, 2017 at 8:50 AM, Pavol Lisy wrote: > On 5/15/17, Chris Angelico wrote: > >> Perhaps a future version of gcc will be implemented in Python. Would >> you then say that Python is beholden to no one? You would still need >> to have a C compiler installed in order to compile extension

Re: How to install Python package from source on Windows

2017-05-15 Thread Pavol Lisy
On 5/15/17, Chris Angelico wrote: > Perhaps a future version of gcc will be implemented in Python. Would > you then say that Python is beholden to no one? You would still need > to have a C compiler installed in order to compile extension modules. > It's too big to include with every single Pytho

Re: Embedded Python import fails with zip/egg files (v3.6.1)

2017-05-15 Thread Griebel, Herbert
Thanks eryk! It looks like I have to dig deeper and step through the Python code again to see what's going on. On 11.05.2017 15:37, eryk sun wrote: On Thu, May 11, 2017 at 9:02 PM, Griebel, Herbert wrote: 07:59:04,3205458python.exe4224CreateFile C:\Users\hansi\Downloads\python-e

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Tue, May 16, 2017 at 7:01 AM, Deborah Swanson wrote: > But I'm a little more mystified that official Python builds are leaning > on Visual C++ (and that's what the crutch comment was primarily aimed > at). Perhaps they're just as resource needy as the extension developers > are and new requirem

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
MRAB wrote, on Monday, May 15, 2017 12:44 PM > > On 2017-05-15 13:52, eryk sun wrote: > > On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson > > wrote: > >> > >> Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There > >> weren't any win32 builds on > https://pypi.python.org/pypi/reco

Re: getting the center of mass of each part of a molecule

2017-05-15 Thread qasimpars
@Gary: No, I don't have any algorithm. Well, I can define what I want: 1) The script will read the atom coordinates of the ligand from the input file sent in previous message. 2) It will calculate the center of mass (COM) for all the ligand atoms and find the ligand heavy atom closest to its COM

Re: How to install Python package from source on Windows

2017-05-15 Thread Nathan Ernst
Deborah, I get the feeling you don't understand the architecture/implementation of Python. The (C)Python interpreter is written in C. A number of the built-in modules are least partially written in C. As such, C is a natural integration point for extensions. Many, many third-party extensions are

Re: getting the center of mass of each part of a molecule

2017-05-15 Thread jladasky
The last line of your function already calculates a center of mass for all atoms. How can you separate out that calculation into its own (one-line) function? How can you send just a subset of your data to that new function? -- https://mail.python.org/mailman/listinfo/python-list

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 11:22 AM > > On Tue, May 16, 2017 at 4:12 AM, Deborah Swanson > wrote: > > It continues to amaze me that Anaconda and Python.org, probably the > > two biggest distributors of official Python builds, are now relying on > > Visual C++. Why can't Pyth

Re: getting the center of mass of each part of a molecule

2017-05-15 Thread Gary Herron
On 05/15/2017 01:29 PM, qasimp...@gmail.com wrote: Hi, I need to get the center of mass (COM) of each half of the ligand shown in the figure (https://i.stack.imgur.com/dtdul.png). I get the main COM all the ligand, lets say it is close to C1 atom. In addition to the main COM of all the ligand

Re: How to install Python package from source on Windows

2017-05-15 Thread eryk sun
On Mon, May 15, 2017 at 7:43 PM, MRAB wrote: > On 2017-05-15 13:52, eryk sun wrote: >> >> The wheel doesn't need a compiler. It has an ABI tag because it >> already includes the compiled extension module. >> > I used pip to install into Python 3.4 (32-bit) from PyPI. It fetched > "recordclass-0.4.

getting the center of mass of each part of a molecule

2017-05-15 Thread qasimpars
Hi, I need to get the center of mass (COM) of each half of the ligand shown in the figure (https://i.stack.imgur.com/dtdul.png). I get the main COM all the ligand, lets say it is close to C1 atom. In addition to the main COM of all the ligand, I need to find the COM of each half of the ligand.

Re: How to install Python package from source on Windows

2017-05-15 Thread MRAB
On 2017-05-15 13:52, eryk sun wrote: On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson wrote: Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There weren't any win32 builds on https://pypi.python.org/pypi/recordclass. It's in the middle of the file list: recordclass-0.4.3-cp3

Re: Rosetta: Zebra puzzle (2.)

2017-05-15 Thread Jan van den Broek
On 2017-05-15, jlada...@itu.edu wrote: > On Sunday, May 14, 2017 at 12:53:41 PM UTC-7, bream...@gmail.com wrote: > >> I report all of his posts on gg as hateful or violent content. > > I have been doing the same. Google, are you listening? Google hates Usenet. -- Jan v/d Broek balgl...@dds.nl -

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Tue, May 16, 2017 at 4:12 AM, Deborah Swanson wrote: > It continues to amaze me that Anaconda and Python.org, probably the two > biggest distributors of official Python builds, are now relying on > Visual C++. Why can't Python developers write the entire setup and > installation code in Python?

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
eryk sun wrote, on Monday, May 15, 2017 5:52 AM > > On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson > wrote: > > > > Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There > > weren't any win32 builds on > https://pypi.python.org/pypi/recordclass. > > It's in the middle > of the

Re: Rosetta: Zebra puzzle (2.)

2017-05-15 Thread jladasky
On Sunday, May 14, 2017 at 12:53:41 PM UTC-7, bream...@gmail.com wrote: > I report all of his posts on gg as hateful or violent content. I have been doing the same. Google, are you listening? -- https://mail.python.org/mailman/listinfo/python-list

Re: Rosetta: Zebra puzzle (2.)

2017-05-15 Thread alister
On Sun, 14 May 2017 12:53:15 -0700, breamoreboy wrote: > On Sunday, May 14, 2017 at 2:44:33 AM UTC+1, Steve D'Aprano wrote: >> On Sun, 14 May 2017 07:03 am, Jan van den Broek wrote: >> >> > On 2017-05-13, Robert L. wrote: >> > >> > [Schnipp] >> > >> >> def build_permutations things >> >> if

Re: How to install Python package from source on Windows

2017-05-15 Thread eryk sun
On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson wrote: > > Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There > weren't any win32 builds on https://pypi.python.org/pypi/recordclass. It's in the middle of the file list: recordclass-0.4.3-cp34-cp34m-win32.whl (md5) Python Wheel

Wichtig für Maximus

2017-05-15 Thread Hans-Georg Joepgen
https://www.heise.de/newsticker/meldung/WannaCry-Microsoft-liefert-Sicherheits-Patches-fuer-veraltete-Windows-Versionen-3713417.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Survey: improving the Python std lib docs

2017-05-15 Thread Ned Batchelder
On Friday, May 12, 2017 at 6:02:58 AM UTC-4, Steve D'Aprano wrote: > One of the more controversial aspects of the Python ecosystem is the Python > docs. Some people love them, and some people hate them and describe them as > horrible. > I have a number of ideas for improving the docs, but I think

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 1:02 AM > > On Mon, May 15, 2017 at 4:48 PM, Deborah Swanson > wrote: > > Chris Angelico wrote on Sunday, May 14, 2017 11:30 PM > >> > >> On Mon, May 15, 2017 at 4:28 PM, Deborah Swanson > >> wrote: > >> > > >> > Again, maybe I should go back to Py

Re: How to install Python package from source on Windows

2017-05-15 Thread Chris Angelico
On Mon, May 15, 2017 at 4:48 PM, Deborah Swanson wrote: > Chris Angelico wrote on Sunday, May 14, 2017 11:30 PM >> >> On Mon, May 15, 2017 at 4:28 PM, Deborah Swanson >> wrote: >> > >> > Again, maybe I should go back to Python 2 for this. >> >> Won't help. The same problems will exist. >> >> Chri