Re: [Tutor] Multiprocessing with many input input parameters

2019-07-12 Thread Shall, Sydney via Tutor
5 9NU ENGLAND E-Mail: sydney.shall (Correspondents outside the College should add @KCL.AC.UK) TEL: +44 (0)208 48 59 01 From: Mike Barnett Sent: 11 July 2019 16:40 To: Shall, Sydney Cc: tutor@python.org Subject: RE: [Tutor] Multiprocessing with many input input param

[Tutor] Multiprocessing with many input input parameters

2019-07-10 Thread Shall, Sydney via Tutor
I am using MAC OS X 10.14.5 on a MAC iBook I use Python 3.7.0 from Anaconda, with Spyder 3.3.3 I am a relative beginner. My program models cell reproduction. I have written a program that models this and it works. Now I want to model a tissue with several types of cells. I did this by simply r

Re: [Tutor] Trouble Downloading To MacOS Mojave 10.14.3 released mid 2014

2019-03-13 Thread Shall, Sydney via Tutor
On 13/03/2019 14:11, Paul McCombs wrote: > On Wed, Mar 13, 2019, 5:05 AM Robert Landers wrote: > >> Hello Tutor, >> >> I am having trouble finding a python 3.7.2 download for my MacOS Mojave >> 10.14.3 released mid 2014. >> I would like to use Xcode to learn python. >> >> Is my OS too old? >> >>

Re: [Tutor] Trouble Downloading To MacOS Mojave 10.14.3 released mid 2014

2019-03-13 Thread Shall, Sydney via Tutor
On 13/03/2019 14:11, Paul McCombs wrote: > On Wed, Mar 13, 2019, 5:05 AM Robert Landers wrote: > >> Hello Tutor, >> >> I am having trouble finding a python 3.7.2 download for my MacOS Mojave >> 10.14.3 released mid 2014. >> I would like to use Xcode to learn python. >> >> Is my OS too old? >> >>

Re: [Tutor] problem with creating paths

2018-10-17 Thread Shall, Sydney via Tutor
On 17/10/2018 18:18, Mats Wichmann wrote: On 10/17/2018 10:07 AM, Shall, Sydney via Tutor wrote: Firstly, I would like to thank Steven for reminding me of the assert statement. I should have remembered this. It allowed me to isolate the problem, which predictably (for me) was very elementary. I

Re: [Tutor] problem with creating paths

2018-10-17 Thread Shall, Sydney via Tutor
Firstly, I would like to thank Steven for reminding me of the assert statement. I should have remembered this. It allowed me to isolate the problem, which predictably (for me) was very elementary. I am too embarrassed to say how simple the error was. However, my original problem was not solved

[Tutor] problem with creating paths

2018-10-17 Thread Shall, Sydney via Tutor
I can now add to my previous email the following observation. If I do not delete the output file and redo the test I get the following as the 'extra' entry in paths: '/Users/sydney/AnacondaProjects/capital_reproduction/Current_Version/Results/20181017D/B_Cycle_Zero/Text_Files') If however, I

[Tutor] problem with creating paths

2018-10-17 Thread Shall, Sydney via Tutor
I am a novice (at programming). I use MAC OS 10.13.6 Anaconda. Python 3.5.4 Spyder 3.5.6 I have just re-written a moderately complex program (a Class) on the advice of Alan and Steven. The rewriting proved to be very useful. The working program uses instances of the Class with User chosen par

[Tutor] Spyder - How to determine files that appear at start-up

2018-10-08 Thread Shall, Sydney via Tutor
My question concerns Spyder. I know that this is a Python list, but I also see that some people here also use Spyder. So, please forgive me. My problem is simple. I cannot find out how I can determine the set of files that open at start-up. I am annoyed by the fact that I must manually load my

Re: [Tutor] Fwd: How to roughly associate the values of two numpy arrays, or python lists if necessary

2018-09-23 Thread Shall, Sydney via Tutor
On 23/09/2018 13:04, Peter Otten wrote: Peter Otten wrote: Maybe you could sort the already-sorted property_b again, with some random offset: import itertools def wiggled(items, sigma): ... counter = itertools.count() ... def key(item): return random.gauss(next(counter), sigma) ...

Re: [Tutor] Fwd: How to roughly associate the values of two numpy arrays, or python lists if necessary

2018-09-23 Thread Shall, Sydney via Tutor
On 23/09/2018 10:42, Peter Otten wrote: Shall, Sydney via Tutor wrote: What I want is the following. I have: property_a = [1, 6, 2, 4] property_b = [62, 73, 31 102] Result should approximately be: property_b = [31, 102, 62, 73] That is both lists change in value in exactly the same

Re: [Tutor] Fwd: How to roughly associate the values of two numpy arrays, or python lists if necessary

2018-09-23 Thread Shall, Sydney via Tutor
On 21/09/2018 00:01, Oscar Benjamin wrote: Sydney wrote and Alan forwarded: I have, I suspect, an elementary problem that I am too inexperienced to resolve. I have two numpy arrays, each representing the values of a specific property of a set of cells. Now, I want to associate the two values

[Tutor] try, except syntax

2018-08-02 Thread Shall, Sydney
MAC OS X 10.13.6 Anaconda python 3.6.5 Anaconda IPython 6.4.0 I am having difficulty in using the try, except form. I copy and paste a minimal program to illustrate my problem. #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug  2 15:41:15 2018 @author: sydney """ uvc = 2

Re: [Tutor] how to change the command "string" on a tkinter Button?

2018-07-28 Thread Shall, Sydney
On 27/07/2018 23:40, Alan Gauld via Tutor wrote: On 27/07/18 11:55, Shall, Sydney wrote: On 01/07/2018 11:19, Steven D'Aprano wrote: Even better would be to learn a form of VCS (version control system) such as Mercurial (hg) or git. Depending on the text editor you are using, it may hav

Re: [Tutor] how to change the command "string" on a tkinter Button?

2018-07-27 Thread Shall, Sydney
On 01/07/2018 11:19, Steven D'Aprano wrote: On Sun, Jul 01, 2018 at 03:32:59PM +1000, Chris Roy-Smith wrote: "Save As..." before engaging in big changes is your friend :-) Even better would be to learn a form of VCS (version control system) such as Mercurial (hg) or git. Depending on the te

[Tutor] Everything in one file?

2018-07-18 Thread Shall, Sydney
On 24/05/2018 03:27, Steven D'Aprano wrote: > On Tue, May 22, 2018 at 03:46:50PM +0530, aishwarya selvaraj wrote: >> Dear all, >> I have created 2 classes in 2 separate files. > > If you have learned the bad habit from Java of putting every class in a > separate file, you should unlearn that h

Re: [Tutor] RAD GUI Development (like Visual Studio/VBA)

2018-07-01 Thread Shall, Sydney
On 30/06/2018 19:21, Alan Gauld via Tutor wrote: > On 30/06/18 11:50, Shall, Sydney wrote: > >>> And if you want to try using Jython or MacPython(?) >>> you can use the native GUI builders for those: >>> - Eclipse/Netbeans (Java) >>> - XDeveloper (MacOS

Re: [Tutor] RAD GUI Development (like Visual Studio/VBA)

2018-06-30 Thread Shall, Sydney
On 30/06/2018 00:34, Alan Gauld via Tutor wrote: On 29/06/18 16:05, Glen wrote: Can someone advise on a RAD, drag and drop style graphical form/dialog creator? Akin to VBA or Visual Studio that will work with Python? There is nothing even close to the VB GUI builder for Python. That's becaus

[Tutor] Problem with testing - container

2018-03-29 Thread Shall, Sydney
I have a problem with a specific test, I think. I use a Mac with OS X 10.13.3 I use Anaconda with Python 3.5 I have been writing tests for a Class that I have written. I am not finished yet, but there are already nearly 400 tests. The tests run and return OK. [After cleaning up many silly mist

[Tutor] problem with a sub-class

2017-11-30 Thread Shall, Sydney
I am almost a beginner. I have an error message which I cannot understand. My problem is with constructing a sub-class. I use; MAC OS V10.13.1 Anaconda Python 3.5 My base Class works properly and all 136 tests of the Base Class are correct. My sub-class is constructed as follows: import sys

[Tutor] unittest difficulty

2017-07-19 Thread Shall, Sydney
I am learning to use unittest. I have written a program that runs as it should. 247 tests give me a satisfactory answer. I have now added one more test and I get an error which I do not understand. The two relevant tests are: def test_type_capitalsadvanced(self): self.assertEqual(type

Re: [Tutor] How to check if user input is an integer

2013-03-29 Thread Shall, Sydney
On 29/03/2013 11:39, Amit Saha wrote: On Fri, Mar 29, 2013 at 9:35 PM, Amit Saha wrote: On Fri, Mar 29, 2013 at 9:33 PM, Ghadir Ghasemi wrote: Hi guys I am trying to create part of a vending machine. The section below is if the user wants to insert 50p coins. It works but when I entered a no

Re: [Tutor] Importing data from a file.

2013-03-21 Thread Shall, Sydney
On 21/03/2013 16:17, Alan Gauld wrote: On 21/03/13 13:43, Shall, Sydney wrote: I have an elementary question provoked by another post today. 1. Is it the case that ALL imported data from a file is a string? Assuming you mean data read from a file rather than modules imported using 'i

Re: [Tutor] Importing data from a file.

2013-03-21 Thread Shall, Sydney
On 21/03/2013 13:54, Amit Saha wrote: On Thu, Mar 21, 2013 at 11:43 PM, Shall, Sydney wrote: I have an elementary question provoked by another post today. 1. Is it the case that ALL imported data from a file is a string? 2. Does this therefor imply that said data has to be processed

[Tutor] Importing data from a file.

2013-03-21 Thread Shall, Sydney
I have an elementary question provoked by another post today. 1. Is it the case that ALL imported data from a file is a string? 2. Does this therefor imply that said data has to be processed appropriately to generate the data in the form required by the program? 3. Are there defined procedures

[Tutor] converting upper case to lowercase and vice-versa

2013-03-15 Thread Shall, Sydney
I am just learning Python and my book does not solve my problem. I have not yet been successful in searching the Python 2.7.3 tutorial I am doing an encryption exercise. Python 2.7.3 MAC OS X 10.6.8 What is the correct syntax to covert English characters from uppercase to lowercase and from low

Re: [Tutor] BMI calc

2013-03-13 Thread Shall, Sydney
On 13/03/2013 12:21, Peter Otten wrote: Shall, Sydney wrote: I am also a newbie, but I wish to learn, so I offer the following corrections. # Note. I do note know what units you are using. # I would use scientific, metric units. So you need to divide both weight and height by a suitable

[Tutor] BMI calc

2013-03-13 Thread Shall, Sydney
On 13/03/2013 00:05, Soliman, Yasmin wrote: Hello all, I'm new to python and its been a stuggle so far. I'm attempting to create a BMI calculator in Wing 101 4.1. I keep getting syntax errors: def calc_BMI(weight,height): return (weight/(height*height))*703.0 if bmi <=18.5: print 'u

Re: [Tutor] BMI calc

2013-03-13 Thread Shall, Sydney
On 13/03/2013 00:05, Soliman, Yasmin wrote: Hello all, I'm new to python and its been a stuggle so far. I'm attempting to create a BMI calculator in Wing 101 4.1. I keep getting syntax errors: def calc_BMI(weight,height): return (weight/(height*height))*703.0 if bmi <=18.5: print 'un

Re: [Tutor] following on

2013-02-19 Thread Shall, Sydney
On 19/02/2013 02:15, Steven D'Aprano wrote:hon modules. Many people will advise that learning C is a good idea. I understand their arguments, but as an old curmudgeon I can say I don't like C and I think the world would be much better without it :-) Does this comment extend to C++? :-) C

Re: [Tutor] First Python Test

2013-02-04 Thread Shall, Sydney
/02/2013 14:58, David Rock wrote: * Shall, Sydney [2013-02-03 16:47]: On 03/02/2013 13:13, Jonatán Guadamuz wrote: El 03/02/2013, a las 06:53 a.m., "Shall, Sydney" escribió: Dear Alan, I installed Cocoa emacs successfully. But it does not run on OS X 10.6.8. The notes with it say t

Re: [Tutor] First Python Test

2013-02-03 Thread Shall, Sydney
Thanks Jonatan. Sydney On 03/02/2013 13:13, Jonatán Guadamuz wrote: El 03/02/2013, a las 06:53 a.m., "Shall, Sydney" escribió: Dear Alan, I installed Cocoa emacs successfully. But it does not run on OS X 10.6.8. The notes with it say that it was built for 10.4. Where may I l

Re: [Tutor] First Python Test

2013-02-03 Thread Shall, Sydney
Dear Alan, I installed Cocoa emacs successfully. But it does not run on OS X 10.6.8. The notes with it say that it was built for 10.4. Where may I look for an update, please? With many thanks for your help. Sydney On 02/02/2013 17:49, Alan Gauld wrote: On 02/02/13 12:57, Shall, Sydney wrote

Re: [Tutor] First Python Test

2013-02-02 Thread Shall, Sydney
Thanks for both your comments, Alan. I am wiser now. Sydney On 02/02/2013 17:50, Alan Gauld wrote: On 02/02/13 15:27, Shall, Sydney wrote: OK. So Bluefish is the Free open-source GNU editor and it is suitable for Python. No thats emacs. Bluefish is an open source web editor(HTML, CSS etc

Re: [Tutor] First Python Test

2013-02-02 Thread Shall, Sydney
non free Operating System nor BrainWashing ones ;-) "Shall, Sydney" writes: Dear Aurelien, Would you please explain how one installs GNU Emacs on a MAC using OS X v10.6. I cannot find a binary package. The GNU site seems to me to have only source code packages. Mille fois merci. Sydney

Re: [Tutor] First Python Test

2013-02-02 Thread Shall, Sydney
Dear Aurelien, Would you please explain how one installs GNU Emacs on a MAC using OS X v10.6. I cannot find a binary package. The GNU site seems to me to have only source code packages. Mille fois merci. Sydney On 02/02/2013 09:54, Aurélien DESBRIÈRES wrote: hmm ... you should use GNU Emacs,

Re: [Tutor] First Python Test

2013-02-02 Thread Shall, Sydney
Text Wrangler is a free, cut-down version of BB-Edit, I think. Sydney On 02/02/2013 09:31, Jamie Griffin wrote: * Simon Yan [2013-02-02 01:11:12 +0800]: I would recommend start off from a simple text editor that has basic syntax highlighting features. There are a number of options out there

Re: [Tutor] First Python Test

2013-02-02 Thread Shall, Sydney
Two free good text editors for the MAC are; 1. Komodo 2. Text Wrangler. hth Sydney On 01/02/2013 17:11, Simon Yan wrote: On Fri, Feb 1, 2013 at 9:18 PM, Dustin Guerri > wrote: Thanks for replying, Simon. I have no particular reason to use Xcode - wh