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

2017-05-19 Thread jladasky
On Friday, May 19, 2017 at 4:17:23 PM UTC-7, qasi...@gmail.com wrote: > The center of mass of the whole ligand that I calculated is the center of > geometry (the average/mean atomic positions) from the sample input file > provided. I don't take other things into account, such as knowledge of the

Re: How to install Python package from source on Windows

2017-05-19 Thread Steve D'Aprano
On Sat, 20 May 2017 10:43 am, Gregory Ewing wrote: > bartc wrote: [...] >> By programmer-hostile do you mean Windows? > > Yes. At least it seems that way to people who are used to developing > on unix systems. For example, your problems with not being able to > run programs from the command line

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Dan Stromberg
On Fri, May 19, 2017 at 6:35 AM, Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. In > fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread oliver
makes sense that the RHS of the equality (deafult value) should be evaluated before the LHS (arg name + type) but if you hadn't pointed out that something was not as you expected, i would not have paid attention and anticipated as you did. Then again RHS vs LHS might have nothing to do with the rea

Re: I need help with making my claculator

2017-05-19 Thread Chris Angelico
On Sat, May 20, 2017 at 11:40 AM, wrote: > def calc(self, display): > try: > display.set(eval(display.get())) > except: > display.set("Type an actual equation please!") Without any specific questions, you're not going to get anything more than a basic eyeballing of the co

Re: I need help with making my calculator

2017-05-19 Thread MRAB
On 2017-05-20 02:42, gars...@gmail.com wrote: m using Python 3.4.2 This is my code: from tkinter import* def iCalc(source, side): storeObj= Frame(source, borderwidth= 1, bd= 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button (source,

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Chris Angelico
On Sat, May 20, 2017 at 11:42 AM, Gregory Ewing wrote: > Steve D'Aprano wrote: >> >> On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: >> >>> I *thought* python 3.0 to 3.4 would *ignore* annotations, but it >>> doesn't... >> >> >> Why would you think that? > > > Ever since Guido retc

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Gregory Ewing
Steve D'Aprano wrote: On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: I *thought* python 3.0 to 3.4 would *ignore* annotations, but it doesn't... Why would you think that? Ever since Guido retconned the purpose of annotations to be for static type hinting *only*, it would ma

I need help with making my calculator

2017-05-19 Thread garsink
m using Python 3.4.2 This is my code: from tkinter import* def iCalc(source, side): storeObj= Frame(source, borderwidth= 1, bd= 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button (source, side, text, command=None): storeObj= B

I need help with making my claculator

2017-05-19 Thread gareths2017
Im using Python 3.4.2 This is my code: from tkinter import* def iCalc(source, side): storeObj= Frame(source, borderwidth= 1, bd= 4, bg="powder blue") storeObj.pack(side=side, expand=YES, fill=BOTH) return storeObj def button (source, side, text, command=None): storeObj= Button(s

Re: How to install Python package from source on Windows

2017-05-19 Thread Gregory Ewing
bartc wrote: If I delete the .a file and do make again, then it will give me a list of object files comprising libpython3.6m.a (not sure why it needs to be a library, rather than bundle the list of .o files with python.o). Most of the interpreter is built as a library so that other programs ca

Re: How to install Python package from source on Windows

2017-05-19 Thread Gregory Ewing
bartc wrote: Compiling a C file should be nothing at all. Especially of a known, working program. Writing reasonably portable C is feasible, as long as you don't use any platform-specific system calls or libraries, don't do any low-level bit twiddling that depends on data sizes and endianness,

Re: How to install Python package from source on Windows

2017-05-19 Thread Gregory Ewing
Steve D'Aprano wrote: The build process on Windows is relatively neglected compared to Linux (but not as much as on OS X) If it's neglected on OSX, it's doing pretty well despite that! I built Python 3.5.1 on my 10.6 system not long ago, and it worked flawlessly. -- Greg -- https://mail.python

Re: How to install Python package from source on Windows

2017-05-19 Thread Gregory Ewing
bartc wrote: Actually, I remember struggling to get even tcc installed! I think I had to compile from source, using configure and make (and that worked, this being Linux). But didn't know how to set it up to work from anywhere. So CC=tcc might not work. If it comes with a standard gnu config

Re: How to install Python package from source on Windows

2017-05-19 Thread Michael Torrie
On 05/19/2017 03:38 PM, bartc wrote: > If I delete the .a file and do make again, then it will give me a list > of object files comprising libpython3.6m.a (not sure why it needs to be > a library, rather than bundle the list of .o files with python.o). The reason is that the core of CPython is a

Re: How to install Python package from source on Windows

2017-05-19 Thread Chris Angelico
On Sat, May 20, 2017 at 9:29 AM, bartc wrote: >> I disagree entirely. For a person who claims to have 40 years >>programming experience I say he's completely clueless. Until such time >> as he can show that he understands source code control, the >> difficulties in building cross platform code a

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Steve D'Aprano
On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. > In fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it > does

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 23:22, breamore...@gmail.com wrote: On Friday, May 19, 2017 at 1:41:02 AM UTC+1, Michael Torrie wrote: On 05/18/2017 05:15 PM, Steve D'Aprano wrote: Oh but this is Bart we're talking about. Of course his code generator is perfect, it is unthinkable that it emits incorrect code.

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

2017-05-19 Thread qasimpars
The center of mass of the whole ligand that I calculated is the center of geometry (the average/mean atomic positions) from the sample input file provided. I don't take other things into account, such as knowledge of the mass of each atom and so on. The difference between the center of mass and

Re: Python subprocess error win 10

2017-05-19 Thread Terry Reedy
On 5/19/2017 10:27 AM, Havalda Andrew wrote: I have encountered a problem with Python 3.6 version, when I open IDLE How did you start IDLE? it says: "Subprocess startup error". There are over 5 possible reasons for this. > I am using Windows 10 That is helpful to know. How did you insta

Re: How to install Python package from source on Windows

2017-05-19 Thread eryk sun
On Fri, May 19, 2017 at 9:18 PM, bartc wrote: > On 19/05/2017 19:53, eryk sun wrote: >> >> On Fri, May 19, 2017 at 1:57 PM, bartc wrote: > > >>> The 'improvement' seems to involve making things more complicated rather >>> than less. > > >> You don't need a full Visual Studio 2015 installation. Yo

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 12:00, bartc wrote: These are the binary files on my Python 3.4 system: python.exe pythonw.exe DLLs/pyexpat.pyd DLLs/python3.dll ... So, which sources are needed to compile and link python.exe for example? Which headers or other files need to be synthesised for them [to] be co

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 19:53, eryk sun wrote: On Fri, May 19, 2017 at 1:57 PM, bartc wrote: The 'improvement' seems to involve making things more complicated rather than less. You don't need a full Visual Studio 2015 installation. You can install Visual C++ 2015 Build Tools [1], which includes MSBu

Re: Python subprocess error win 10

2017-05-19 Thread Peter Otten
Havalda Andrew wrote: [Please answer to the list rather than in private mail. Thank you.] > Yes, the message is exactly like that. I can't really use the command > line, so could you please tell me how should I start it from there with > the -n option? I'm sorry I cannot give you any details as

Re: How to install Python package from source on Windows

2017-05-19 Thread eryk sun
On Wed, May 17, 2017 at 10:49 PM, Michael Torrie wrote: > > In fact Python 3.6 ships with the latest version of the MSVCRT universal > runtime. Windows Python 3.6 is distributed with vcruntime140.dll, which is a relatively small component of the CRT that's closely coupled to the compiler. The Un

Re: How to install Python package from source on Windows

2017-05-19 Thread eryk sun
On Fri, May 19, 2017 at 1:57 PM, bartc wrote: >> Yes, we acknowledge that there's much improvement needed to building >> Python, especially on Windows. > > The 'improvement' seems to involve making things more complicated rather > than less. > > (So I need VS2015, .NET, GIT, SVN and MSBUILD. Or ma

EuroPython 2017 Keynote: Katharine Jarmul

2017-05-19 Thread Alexander Hendorf
We are pleased to announce our next keynote speaker for EuroPython 2017: * Katharine Jarmul * About Katharine Jarmul Katharine Jarmul is a pythonista and founder of Kjamistan, a data consulting company in Berlin, Germany. She’s been using P

Re: python-enum34

2017-05-19 Thread Gene Heskett
On Friday 19 May 2017 10:21:26 Peter Otten wrote: > Gene Heskett wrote: > > On Friday 19 May 2017 09:32:00 Ethan Furman wrote: > >> On 05/19/2017 04:49 AM, Gene Heskett wrote: > >> > I have a need for the subjects function but installed on wheezy. > >> > But it is not in the repo's. > >> > > >> >

Re: Python subprocess error win 10

2017-05-19 Thread Peter Otten
Havalda Andrew wrote: > Dear Python team, > > I have encountered a problem with Python 3.6 version, when I open IDLE it > sais: "Subprocess startup error". I attached a photo of it. This is a text-only list, so we will not be able to see any pictures. > And after I > click "Ok" it closes. I ca

RE: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Edward Ned Harvey (python)
This pattern seems to work: import sys if sys.version_info[0] < 3: raise RuntimeError("Must use at least python version 3") # The 'typing' module, useful for type hints, was introduced in python 3.5 if sys.version_info[1] >= 5: from typing import Optional optional_float = Optional[fl

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Peter Otten
Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. > In fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it > doesn't... > > I'm struggling to

Python subprocess error win 10

2017-05-19 Thread Havalda Andrew
Dear Python team, I have encountered a problem with Python 3.6 version, when I open IDLE it sais: "Subprocess startup error". I attached a photo of it. And after I click "Ok" it closes. I can not even use IDEs either. (I can not run a single print statement...) I am using Windows 10 on a Dell la

Re: python-enum34

2017-05-19 Thread Peter Otten
Gene Heskett wrote: > On Friday 19 May 2017 09:32:00 Ethan Furman wrote: > >> On 05/19/2017 04:49 AM, Gene Heskett wrote: >> > I have a need for the subjects function but installed on wheezy. >> > But it is not in the repo's. >> > >> > Is there a solution that doesn't break wheezy? >> >> It's a p

FW: Python win 10 problem

2017-05-19 Thread Andrew Havalda
Sent from Mail for Windows 10 From: Havalda Andrew Sent: 2017. május 18., csütörtök 19:56 To: python-list@python.org Subject: Python win 10 problem Dear Python team, I have encountered a problem with Python 3.6 version, when I open IDLE it sais: "Subprocess startup error". I attached a photo

Re: python-enum34

2017-05-19 Thread Gene Heskett
On Friday 19 May 2017 09:32:00 Ethan Furman wrote: > On 05/19/2017 04:49 AM, Gene Heskett wrote: > > I have a need for the subjects function but installed on wheezy. > > But it is not in the repo's. > > > > Is there a solution that doesn't break wheezy? > > It's a pure Python module, so should wo

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 12:41, Steve D'Aprano wrote: On Fri, 19 May 2017 08:36 pm, bartc wrote: Which gcc version? I can't get mine (5.1.0) to report any of these, even with -Wall -Wextra -Wpedantic. [steve@ando langs]$ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55) Interesting; an older

type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Edward Ned Harvey (python)
I think it's great that for built-in types such as int and str, backward compatibility of type hinting annotations is baked into python 3.0 to 3.4. In fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it doesn't... I'm struggling to create something backward compatible that re

Re: python-enum34

2017-05-19 Thread Ethan Furman
On 05/19/2017 04:49 AM, Gene Heskett wrote: I have a need for the subjects function but installed on wheezy. But it is not in the repo's. Is there a solution that doesn't break wheezy? It's a pure Python module, so should work fine. But I would recommend aenum instead as I only update enum

Finding sentinel text when using a thread pool...

2017-05-19 Thread Christopher Reimer
Greetings, I'm developing a web scraper script. It takes 25 minutes to process 590 pages and ~9,000 comments. I've been told that the script is taking too long. The way the script currently works is that the page requester is a generator function that requests a page, checks if the page cont

python-enum34

2017-05-19 Thread Gene Heskett
Greetings all; I have a need for the subjects function but installed on wheezy. But it is not in the repo's. Is there a solution that doesn't break wheezy? Thanks. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in tha

No module named vtkCommonCorePython

2017-05-19 Thread Nurzat Aysa
Hello everyone, I have a problem to finding file in Python path,Anybody knows how to solve it? Unexpected error: Traceback (most recent call last): File "/home/nurzat/Documents/vmtk-build/Install/bin/vmtklevelsetsegmentation", line 20, in from vmtk import pypeserver File "/usr/loca

Re: How to install Python package from source on Windows

2017-05-19 Thread Steve D'Aprano
On Fri, 19 May 2017 08:36 pm, bartc wrote: > Which gcc version? I can't get mine (5.1.0) to report any of these, even > with -Wall -Wextra -Wpedantic. [steve@ando langs]$ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55) Copyright (C) 2006 Free Software Foundation, Inc. This is free soft

Re: How to install Python package from source on Windows

2017-05-19 Thread Chris Angelico
On Fri, May 19, 2017 at 9:00 PM, bartc wrote: > Just to get the ball rolling, they don't need to be perfect. Building > python.exe would be a useful first step, even if it fails to run for many > other reasons. Actually, it's more useful if it completely fails to build. As I was porting one parti

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 08:56, Gregory Ewing wrote: Bart, I think the original experiment you were trying to do (compiling Python with tcc) would be much more easily performed on Linux than Windows. Have you considered trying that? Yes, the last time I tried to compile CPython, I had to do it on Linux.

Re: How to install Python package from source on Windows

2017-05-19 Thread bartc
On 19/05/2017 04:31, Steve D'Aprano wrote: On Fri, 19 May 2017 04:17 am, bartc wrote: There is one uninitialised variable reported. And that is used only in an error situation. But yes, that was a mistake. "Only one"? Its a bit naughty to claim "one" uninitialized variable when there

Re: How to install Python package from source on Windows

2017-05-19 Thread Terry Reedy
On 5/19/2017 2:33 AM, Christian Gollwitzer wrote: Caveat Emptor: I haven't run this build bat on Windows myself. I am a bit astonished it depends on svn. Which software packages does it download via svn? At least some of the dependencies. You can check the external.bat invoked by the -e opt

Re: Enigma (Tantaliser 482)

2017-05-19 Thread BlindAnagram
On 19/05/2017 10:06, BlindAnagram wrote: > Hi Jim, > > I woke up this morning realising that my published code for this > tantaliser is not very good. > > I would hence be most grateful if you could substitute the attached version. > >best regards, > > Brian Apologies - posted in err

Enigma (Tantaliser 482)

2017-05-19 Thread BlindAnagram
Hi Jim, I woke up this morning realising that my published code for this tantaliser is not very good. I would hence be most grateful if you could substitute the attached version. best regards, Brian from itertools import combinations, permutations, product # enumerate the names A, B,

Re: How to install Python package from source on Windows

2017-05-19 Thread Gregory Ewing
Bart, I think the original experiment you were trying to do (compiling Python with tcc) would be much more easily performed on Linux than Windows. Have you considered trying that? Configure and compile it for Linux using gcc first, then set CC=tcc and try to compile it again. If you're lucky, you

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

2017-05-19 Thread Gregory Ewing
qasimp...@gmail.com wrote: "The atoms of the first part/half according to the main COM of the ligand are C2, C7, C8 and C9. As for the second part they are C3, C4, C5 and C6 atoms." Think *very* carefully about how you made that decision. Was it based *only* on the position of the centre of mas