Re: [Tutor] Fwd: Re: HELP PLEASE

2019-08-12 Thread Alan Gauld via Tutor
On 12/08/2019 19:35, Alan Gauld via Tutor wrote: > To save some typing convert the?? int conversion loop into a function: > > > def?? to_ints(strings): > ?? num_copy = [] > ?? for num in nums: > num_copy.append(float(num)) > > ?? return num_copy # No idea where all

[Tutor] Fwd: Re: HELP PLEASE

2019-08-12 Thread Alan Gauld via Tutor
Forwarding to tutorblist for info... Forwarded Message Subject:Re: [Tutor] HELP PLEASE Date: Mon, 12 Aug 2019 19:34:48 +0100 From: Alan Gauld Reply-To: alan.ga...@yahoo.co.uk To: Marissa Russo On 12/08/2019 19:17, Marissa Russo wrote: > I fixed some t

[Tutor] Fwd: RE: pointers or references to variables or sub-sets of variables query.

2019-07-15 Thread Alan Gauld via Tutor
Forwarding to list Forwarded Message Subject:RE: [Tutor] pointers or references to variables or sub-sets of variables query. Date: Mon, 15 Jul 2019 17:13:23 +1000 From: mhysnm1...@gmail.com To: 'Alan Gauld' All, Sorry for the late response. I have moved

[Tutor] Fwd: Re: Unexpected result when running flask application.

2019-06-28 Thread Albert-Jan Roskam
Ooops, forgot to 'reply all' -- Forwarded message -- From: Albert-Jan Roskam Date: 28 Jun 2019 21:31 Subject: Re: [Tutor] Unexpected result when running flask application. To: Cameron Simpson Cc: On 20 Jun 2019 00:56, Cameron Simpson wrote: On 19Jun2019 09:54, Alan Gauld wro

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Steven D'Aprano
On Fri, Jun 21, 2019 at 05:18:02PM -0500, Antonio Arizpe wrote: > i only need this to function on windows 7 and 10, 32 and 64 bits > i dont need any specificity to the counter other than the numeric sum of > clicks pressed on the local machine. > as far as this idea goes its very fair to make it a

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
if it cannot escape the simplicity of logging the keyboard as a individual mechanical entity i can understand that better now because you are right it all comes down to the OS or the driver handling to even be able to begin the register of a device. but i am more than willing to be as basic implem

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Alan Gauld via Tutor
On 21/06/2019 14:59, Antonio Arizpe wrote: > i just need help with a script thats registers keystrikes and adds up all > the times you've struck a key and gives a number of the total amount of > times the keyboard was struck. nothing specific about characters. just how > many times it was struck i

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
Hey ive looked everywhere and i would really appreciate the guidance i know its not too complicated by google search results dodge my real question i just need help with a script thats registers keystrikes and adds up all the times youve struck a key and gives a number of the total amount of ti

Re: [Tutor] Fwd: Re: Hii

2019-06-20 Thread Antonio Arizpe
On Thu, Jun 20, 2019 at 12:36 PM Alan Gauld via Tutor wrote: > Forwarding to list. > Please use Reply-All or Reply-List when responding to list emails. > > > > Forwarded Message > Subject:Re: [Tutor] Hii > Date: Thu, 20 Jun 2019 08:50:31 -0500 > From: Antonio Arizpe

[Tutor] Fwd: Re: Hii

2019-06-20 Thread Alan Gauld via Tutor
Forwarding to list. Please use Reply-All or Reply-List when responding to list emails. Forwarded Message Subject:Re: [Tutor] Hii Date: Thu, 20 Jun 2019 08:50:31 -0500 From: Antonio Arizpe To: Alan Gauld i am using python 3.7 On Thu, Jun 20, 2019 at 8:43 AM

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-06 Thread Alan Gauld via Tutor
On 06/06/2019 00:57, Alan Gauld via Tutor wrote: > But in the second example you actially change the object > that checklimit refers to. > > checklimit = 22 # immutable value assigned > feeds['bar'] = checklimit # both refer to same immutable value > base_var = 66 # now feeds refers to orig

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-06 Thread nathan tech
Hi alan, thanks so much for clearing that up. Now you've explained it in that way, I understand what it is doing and how it went wrong. Thank you so much! Nathan On 06/06/2019 00:57, Alan Gauld via Tutor wrote: > On 05/06/2019 20:47, nathan tech wrote: > >> so for example if I do: >> >> feeds

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread Alan Gauld via Tutor
On 05/06/2019 20:47, nathan tech wrote: > so for example if I do: > > feeds[feed1]["limit"]=g.checklimit > > And later did g.checklimit=7000 > > Would it change feeds[feed1]["limit"] too? No, because the feeds value is still referencing the original value object. The issue arises when you modi

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread nathan tech
hi there, Thanks for that, I never thought of those options, though now you mention them, I'm going, duh! I also, defined in globals, have a variable called checklimit. EG: g.checklimit. Am I ok to assign that to values? so for example if I do: feeds[feed1]["limit"]=g.checklimit And later

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread Alan Gauld via Tutor
> That is why I was going to use g.blank-feed as the template, > assign that to d["feed 1's link"] then just update the feed part. The simplest way is just to assign a new blank dictionary. Don;t assign the same dictionary to each feed. (Incidentally your description above is much clearer than

[Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread nathan tech
Thought I addressed this to the list... Aparrently my mail client hates me. Forwarded Message Subject:Re: [Tutor] would someone please explain this concept to me Date: Wed, 5 Jun 2019 02:37:49 +0100 From: nathan tech To: Steven D'

Re: [Tutor] Fwd: Re: Setting Command Line Arguments in IDLE

2019-05-26 Thread Mats Wichmann
> On 26/05/2019 02:55, Richard Damon wrote: >> I am working on a python script that will be provided arguments when run >> from the system command line. Is there any place in IDLE to provide >> equivalent arguments for testing while developing in IDLE? >> > > There used to be a dialog for that b

[Tutor] Fwd: Re: Setting Command Line Arguments in IDLE

2019-05-26 Thread Alan Gauld via Tutor
Oops, Forgot to include the list! Forwarded Message Subject:Re: Setting Command Line Arguments in IDLE Date: Sun, 26 May 2019 09:03:36 +0100 From: Alan Gauld To: Richard Damon On 26/05/2019 02:55, Richard Damon wrote: > I am working on a python script t

[Tutor] Fwd: RE: regular expressions query

2019-05-24 Thread Alan Gauld via Tutor
Forwarding to the list, plase use reply-all or reply-list when responding to list mails. Alan G. Forwarded Message Subject:RE: [Tutor] regular expressions query Date: Fri, 24 May 2019 20:10:48 +1000 From: mhysnm1...@gmail.com To: 'Alan Gauld' Allan, I have

[Tutor] Fwd: Re: feedparser in python

2019-04-30 Thread Alan Gauld via Tutor
Sharing with the list, comments later. Busy right now. Forwarded Message Subject:Re: [Tutor] feedparser in python Date: Tue, 30 Apr 2019 14:14:35 + From: nathan tech To: Alan Gauld Hi Alan, Thanks for your emails. I considered what you said, and came

Re: [Tutor] Fwd: uploading images in pygame

2019-04-17 Thread Alan Gauld via Tutor
On 17/04/2019 10:14, fatima butt wrote: > the python version is 3.7.3 > computer is acer SWIFT > The error I get is following: > Traceback (most recent call last): > File "C:\Users\ammah\OneDrive\Documents\project1\myCode.py.py > ", line 84, in > background = pygame.ima

Re: [Tutor] Fwd: uploading images in pygame

2019-04-17 Thread Peter Otten
fatima butt wrote: > the python version is 3.7.3 > computer is acer SWIFT > The error I get is following: > Traceback (most recent call last): > File "C:\Users\ammah\OneDrive\Documents\project1\myCode.py.py > ", line 84, in > background = > pygame.image.load(path.j

Re: [Tutor] Fwd: uploading images in pygame

2019-04-17 Thread fatima butt
the python version is 3.7.3 computer is acer SWIFT The error I get is following: Traceback (most recent call last): File "C:\Users\ammah\OneDrive\Documents\project1\myCode.py.py ", line 84, in background = pygame.image.load(path.join(img_dir,"ship1.jpg")).convert() pyga

Re: [Tutor] Fwd: IDLE Terminal

2019-04-17 Thread fatima butt
Its IDLE python version 3.7.3 ITs Subprocess Startup Error. IDLE startupprocess didnt make connection.Either IDLE cant start a process or personal firewall software is blocking the connection. the computer i am using is swift acer On Tue, 16 Apr 2019 at 23:40, Alan Gauld via Tutor wrote: > On

Re: [Tutor] Fwd: IDLE Terminal

2019-04-17 Thread fatima butt
hi the python version is 3.7.3 computer is acer SWIFT The error I get is following: Traceback (most recent call last): File "C:\Users\ammah\OneDrive\Documents\project1\myCode.py.py", line 84, in background = pygame.image.load(path.join(img_dir,"ship1.jpg")).convert() pygame.error: Couldn't o

Re: [Tutor] Fwd: IDLE Terminal

2019-04-16 Thread Tobiah
On 4/16/19 12:54 PM, fatima butt wrote: [image: image.png]please I need help with IDLE teminal..its giving me error. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fwd: IDLE Terminal

2019-04-16 Thread Alan Gauld via Tutor
On 16/04/2019 20:54, fatima butt wrote: > [image: image.png]please I need help with IDLE teminal..its giving me error. The mail server drops attachments because they are a potential security threat. Please post the error text (cut 'n paste if possible) Also describe what you are trying to do. Whi

Re: [Tutor] Fwd: uploading images in pygame

2019-04-16 Thread Alan Gauld via Tutor
On 16/04/2019 20:54, fatima butt wrote: > please i am getting error.. Hi, we need to be quite specific here about the details because it is not clear exactly what you are trying to do. > i am trying to upload image from openspaceart > from internet . Just to be clear. Uploading means going from

Re: [Tutor] Fwd: uploading images in pygame

2019-04-16 Thread Mats Wichmann
On 4/16/19 1:54 PM, fatima butt wrote: > please i am getting error..i am trying to upload image from openspaceart > from internet . I have downloaded the image on my desktop and i am trying > to upload this to the pygame. Please provide us with more information. What are you trying (hint: *code*),

[Tutor] Fwd: IDLE Terminal

2019-04-16 Thread fatima butt
[image: image.png]please I need help with IDLE teminal..its giving me error. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Fwd: uploading images in pygame

2019-04-16 Thread fatima butt
please i am getting error..i am trying to upload image from openspaceart from internet . I have downloaded the image on my desktop and i am trying to upload this to the pygame. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

[Tutor] Fwd: [Tkinter-discuss] New docs: using tkinter GUIs on Android

2019-02-10 Thread boB Stepp
I thought that this might be of interest to the group for those who do not follow the Tkinter mailing list as I have seen questions here about how to do Python GUIs in Android where the usual response is to try Kivy. Perhaps there is now a tkinter solution? -- Forwarded message -

Re: [Tutor] Fwd: Re: Doubt in Python

2019-01-17 Thread Steven D'Aprano
On Thu, Jan 17, 2019 at 09:57:03AM +, Alan Gauld via Tutor wrote: > The algorithm is probably described somewhere in the documentation > but my understanding is that it looks something like this(in pdeudo code): List, tuple and string comparisons are defined as lexicographical order: http://

[Tutor] Fwd: Re: Doubt in Python

2019-01-17 Thread Alan Gauld via Tutor
CCing the list. Please use Reply All or Reply List on responses to the list. On 17/01/2019 07:24, Maninath sahoo wrote: a=[100,50,30] b=[100,90,3] a True a>b > False > > > How it compares between two lists > The algorithm is probably described somewhere in the documentation b

[Tutor] Fwd: Data pattern query.

2019-01-07 Thread Alan Gauld via Tutor
Sending to list. Please use reply-all when responding to the list. Original Message Subject: RE: [Tutor] Data pattern query. From: mhysnm1...@gmail.com Sent: Monday, 7 January 2019 11:58 To: 'Alan Gauld' CC: Alan, Thanks for responding. I am storing the spreadsheet into

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-23 Thread Avi Gross
and you may find other such packages better fit your needs and let you easily save all kinds of info like scores and time elapsed and number of moves as you are saving entire data structures you create and control. Just some thoughts. Avi -Original Message- From: Tutor On Beha

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread William Ray Wing via Tutor
> On Oct 22, 2018, at 8:30 PM, boB Stepp wrote: > > On Mon, Oct 22, 2018 at 11:57 AM Mats Wichmann wrote: >> >> On 10/22/18 8:24 AM, boB Stepp wrote: >>> Forwarding to the Tutor list. Herr Maier offers a good idea that >>> would take away much of a remaining issue -- the name "Temporary". I

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread boB Stepp
On Mon, Oct 22, 2018 at 11:57 AM Mats Wichmann wrote: > > On 10/22/18 8:24 AM, boB Stepp wrote: > > Forwarding to the Tutor list. Herr Maier offers a good idea that > > would take away much of a remaining issue -- the name "Temporary". I > > need to look into the functools library to see what "p

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread Mats Wichmann
On 10/22/18 8:24 AM, boB Stepp wrote: > Forwarding to the Tutor list. Herr Maier offers a good idea that > would take away much of a remaining issue -- the name "Temporary". I > need to look into the functools library to see what "partial" does. if you really don't care what the file is called

[Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread boB Stepp
Forwarding to the Tutor list. Herr Maier offers a good idea that would take away much of a remaining issue -- the name "Temporary". I need to look into the functools library to see what "partial" does. -- Forwarded message - From: Wolfgang Maier Date: Mon, Oct 22, 2018 at 5:25 A

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 order

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

2018-09-23 Thread Peter Otten
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) > ... return sorted(items,

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

2018-09-23 Thread Peter Otten
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 order. > > Now, this is e

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

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

2018-09-20 Thread Oscar Benjamin
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 for each cell, that is for each

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

2018-09-19 Thread Alan Gauld via Tutor
Forwarded to list 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 for each cell, that is fo

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Alan Gauld via Tutor
On 05/09/18 18:12, Chip Wachob wrote: > In your examples name1 and name2 could be anything that is contained > in that module.. a variable, function, class, etc.. correct? Correct. They are just names. Again a difference between Python and C. In C a name is a label associated with a memory addr

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
This helps tremendously! One last question. In your examples name1 and name2 could be anything that is contained in that module.. a variable, function, class, etc.. correct? On Wed, Sep 5, 2018 at 12:58 PM, Alan Gauld via Tutor wrote: > On 05/09/18 15:06, Chip Wachob wrote: > >> Okay, I th

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Alan Gauld via Tutor
On 05/09/18 15:06, Chip Wachob wrote: > Okay, I think I'm starting to get a handle on the visibility of > things. As you said, much different than C. Yes. The significant thing is to remember that in Python you are importing names. In C you include the contents of the file. #include Lets you

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
Thank you! Okay, I think I'm starting to get a handle on the visibility of things. As you said, much different than C. Just to confirm that I'm understanding correctly: Even through the import Adafruit_GPIO as GPIO line exists in the AdafruitInit.py file, which is imported by the import Adafrui

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Alan Gauld via Tutor
On 05/09/18 14:05, Chip Wachob wrote: > # module AdafruitInit.py > # from the Adafruit tutorials.. > import Adafruit_GPIO.FT232H as FT232H > import Adafruit_GPIO as GPIO > > FT232H.use_FT232H() > > ft232h = FT232H.FT232H() > > # config settings for the SPI 'machine' > spi = FT232.SPI(ft232h, 4, 200

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
Alan, Once again, thank you for the feedback and comments. Revised code snips: Sorry they were not complete. Several typos while trying to create the SSCCE version. # module AdafruitInit.py # from the Adafruit tutorials.. import Adafruit_GPIO.FT232H as FT232H import Adafruit_GPIO as GPIO FT232

Re: [Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Alan Gauld via Tutor
On 05/09/18 04:12, Chip Wachob wrote: > # module RSI.py > def write(byte): >spi.write(byte) You don't have any import statements here. You need to import spi to use it. > # toggle the latch signal >ft232h.output(5, GPIO.LOW) >ft232h.output(5, GPIO.HIGH) And the same for ft232h > >

[Tutor] Fwd: Accessing variables from other modules

2018-09-05 Thread Chip Wachob
My apologies. I hit reply and not reply to all. Alan, I think I answered many of your questions in this message to Steven. -- Forwarded message -- From: Chip Wachob Date: Tue, Sep 4, 2018 at 1:48 PM Subject: Re: [Tutor] Accessing variables from other modules To: Steven D'Apr

[Tutor] Fwd: Re: Argparse Error

2018-08-13 Thread Alan Gauld via Tutor
Forwarding to list since I seem to have messed up the address last time... Forwarded Message Subject:Re: [Tutor] Argparse Error Date: Sun, 12 Aug 2018 23:44:04 +0100 From: Alan Gauld Reply-To: tutor To: Nathan Johnson On 12/08/18 19:58, Nathan Johnson

[Tutor] Fwd: Syntax question

2018-08-09 Thread Abdur-Rahmaan Janhangeer
missed reply all Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- Forwarded message - From: Abdur-Rahmaan Janhangeer Date: Thu, 9 Aug 2018, 11:56 Subject: Re: [Tutor] Syntax question To: Matthew Polack wheatbutton = Button(root, text="Wheat", fg="black",

[Tutor] Fwd: File handling Tab separated files

2018-04-19 Thread Brian Lockwood
>> >> Here are some fixes >> >> filename is a variable and hence should not be in quotes. >> file_ is then called ‘f’ on the next line. >> The indenting is a bit wrong but this may just be your email. >> >> the line read_data … should be followed by something that appends the >> read_data to “

[Tutor] Fwd: How to Load Every Revised Wikipedia Page Revision

2018-02-21 Thread dbosah
Sent from my T-Mobile 4G LTE Device Original message From: Daniel Bosah Date: 2/19/18 3:50 PM (GMT-05:00) To: tutor@python.org Subject: How to Load Every Revised Wikipedia Page Revision Good day, I'm doing research for a compsci group. I have a script that is supposed to

Re: [Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Wolfgang Maier
On 06.02.2018 10:53, Alan Gauld via Tutor wrote: You would have needed something like fraction = Fraction(input('>')) Assuming Fraction has a string based constructor which I don't think it does. I really don't think Fraction helps you here. Oh, most certainly it has - though it may accept m

Re: [Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Alan Gauld via Tutor
On 06/02/18 09:26, Alan Gauld via Tutor wrote: > Forwarding to list, please always use Reply ALL or Reply LIst to send > mail to the list. > > What input did you use and what output did you get? > > Input 239/30  --->  7 1 29 > Input 415/93  --->  4 2 6 7 > > So far as I can tell your algorithm

[Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Alan Gauld via Tutor
Forwarding to list, please always use Reply ALL or Reply LIst to send mail to the list. -Original Message- From: Alan Gauld via Tutor To: tutor Sent: Mon, Feb 5, 2018 4:50 am Subject: Re: [Tutor] fractions from Fractions On 05/02/18 04:11, Rex Florian via Tutor wrote: > The problem i

Re: [Tutor] Fwd: Need help with reading and cleaning CSV files for a class

2018-01-29 Thread Neil Cerutti
On 2018-01-28, Geoff Hancock wrote: > Good day- > I'm in a difficult situation. > I have been asked to help teach students how to clean up a CSV > file in Python. Can you give an example of the kind of thing you need to teach? It is malformed csv that has to be changed into well-formed? That's

Re: [Tutor] Fwd: Need help with reading and cleaning CSV files for a class

2018-01-28 Thread Alan Gauld via Tutor
On 28/01/18 13:36, Geoff Hancock wrote: > Good day- > I have been asked to help teach students how to clean up a CSV file in > Python. I'm not sure what you mean by "clean up" a CSV file. If the file is malformed then turning it into a well formed CSV file is a non trivial text processing task.

Re: [Tutor] Fwd: Need help with reading and cleaning CSV files for a class

2018-01-28 Thread leam hall
On Sun, Jan 28, 2018 at 8:36 AM, Geoff Hancock wrote: > Good day- > I'm in a difficult situation. > I have been asked to help teach students how to clean up a CSV file in > Python. > The job has fallen to me because the teacher of the course is out on > emergency leave and I just found out. > Tomo

[Tutor] Fwd: Need help with reading and cleaning CSV files for a class

2018-01-28 Thread Geoff Hancock
Good day- I'm in a difficult situation. I have been asked to help teach students how to clean up a CSV file in Python. The job has fallen to me because the teacher of the course is out on emergency leave and I just found out. Tomorrow I have to show students how to get a CSV file and write code to

Re: [Tutor] Fwd: print a for loop system call

2018-01-20 Thread Alan Gauld via Tutor
On 20/01/18 18:26, Derek Smith wrote: > import os > import sys > from subprocess import Popen, PIPE > > pipe = Popen('lsdev -c tape', shell=True, stdout=PIPE) > > for dev in pipe.stdout : > print ( dev.strip().split()[0].decode() )## A ## This is OK > # print ( dev.strip().split().

[Tutor] Fwd: print a for loop system call

2018-01-20 Thread Derek Smith
Sent from my iPhone Begin forwarded message: From: Derek Smith mailto:dereksm...@racksquared.com>> Date: January 19, 2018 at 4:01:58 PM EST To: "tutor-requ...@python.org" mailto:tutor-requ...@python.org>> Subject: print a for loop system call Why does A work

[Tutor] Fwd: Re: checking connection to internet until success

2018-01-02 Thread Alan Gauld via Tutor
Forwarding to list... Forwarded Message Subject:Re: [Tutor] checking connection to internet until success Date: Wed, 3 Jan 2018 01:35:18 +0100 From: Pi To: Alan Gauld 10 months ago i wrote application using time from OS (Windows 7), but my alpha tester fou

[Tutor] Fwd: Re: (no subject)

2017-11-12 Thread Alan Gauld via Tutor
Forwarding to the list... From: RRRoy BBBean Organisation: DDDead MMMail To: Alan Gauld , tutor@python.org On Sun, 2017-11-12 at 23:06 +, Alan Gauld via Tutor wrote: > On 12/11/17 15:54, 劉權陞 wrote: ... > Can you tell us what language this is? > Or better still

[Tutor] Fwd: Python programming for the absolute beginner

2017-10-01 Thread boB Stepp
-- Forwarded message -- From: Howard B Date: Sun, Oct 1, 2017 at 2:20 PM Subject: Re: [Tutor] Python programming for the absolute beginner To: boB Stepp The 2010 copyright version, ISBN 978-1-4354-5500-9, discusses installing Python 3.1 (main text on page 5, and Appendix A on pa

Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Martin A. Brown
Hello and good afternoon, The image: > http://imgur.com/a/CwA2G To me, this looks like a 'graph', which is a more general data structure -- it does not look like a 'tree' (in the computer-science meaning of the term, anyway). For purposes of all of my comments and answers below, I confess th

Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Michael C
I dont know what a data model is :( I am thinking with one entry, I can have (x,y,z). Z is probably a list and it says to what point it connects to. so it's a list of lists. The problem then becomes: how do I generate a list of possible routes? So I'll potentially have a very big list of routes and

Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Mats Wichmann
On 08/14/2017 03:06 PM, Alan Gauld via Tutor wrote: > > Forwarding to the list. > > Forwarded Message > > > > > pic > http://imgur.com/a/CwA2G > > On Mon, Aug 14, 2017 at 8:55 AM, Alan Gauld via Tutor > wrote: > > On 13/08/17 21:07, Michael C

[Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Alan Gauld via Tutor
Forwarding to the list. Forwarded Message pic http://imgur.com/a/CwA2G On Mon, Aug 14, 2017 at 8:55 AM, Alan Gauld via Tutor mailto:tutor@python.org>> wrote: On 13/08/17 21:07, Michael C wrote: > Please look at the picture attached: This is a text mailing lis

[Tutor] Fwd: Re: basic decorator question

2017-07-24 Thread Alan Gauld
Bah, Forgot to ReplyAll... Forwarded Message On 24/07/17 15:33, bruce wrote: > But, I'm sooo confuzed! My real question though, can a decorator have > multiple internal functions? Yes and classes too if you want. A decorator is just a standard function in all respects. The

[Tutor] Fwd: Re: Python Help

2017-07-23 Thread Alan Gauld via Tutor
Forwarding to list Forwarded Message I did use the pip command and am attempting to add the files to my python path. I used import sys sys.path.append("/Users/Jim/Documents/illustris_python") and that worked. I even checked to make sure the files were there import sys pri

[Tutor] Fwd: Re: Python Help

2017-07-23 Thread Alan Gauld via Tutor
Forwarding to list, please use ReplyAll or ReplyList when responding to the list. Forwarded Message I also tried the correct command for the mac ox s in terminal shell, running: Jims-MacBook-Pro-2:~ Jim$ PYTHONPATH="/Users/Jim/Documents/illustris_python:$PYTHONPATH > export

Re: [Tutor] Fwd: Re: call key on_press event multiple times when key is held down

2017-07-10 Thread Alan Gauld via Tutor
On 04/07/17 13:45, Carlton Banks wrote: > Any suggestion on any GUI solutions? Here is a Tkinter solution that increments a counter while the mouse button is pressed. It should give you the idea... Obviously you need to replace the counter increment with your desired processing. And the print sta

Re: [Tutor] Fwd: Re: call key on_press event multiple times when key is held down

2017-07-04 Thread Carlton Banks
> >> Interesting solution, but still find a bit "dirty hackish” >> to involve a timer in this.. I guess it just would be neat if >> it just worked as i thought it to be. But i guess i have to look into >> curses. > > A timer based loop is actually the standard pattern for > implementing a loo

Re: [Tutor] Fwd: Re: call key on_press event multiple times when key is held down

2017-07-04 Thread Alan Gauld via Tutor
On 04/07/17 12:00, Alan Gauld via Tutor wrote: >> the library you are using, I normally just use the standard >> library for such things, or build a simple GUI… > > Standard library being?.. The Python standard library that ships with Python and is documented on python.org. As in: >> There are

[Tutor] Fwd: Re: call key on_press event multiple times when key is held down

2017-07-04 Thread Alan Gauld via Tutor
Forwarding to Tutor list Please always use reply-All or reply-List to respond to tutor posts. Forwarded Message > Den 4. jul. 2017 kl. 11.35 skrev Alan Gauld via Tutor : > > On 04/07/17 09:50, Carlton Banks wrote: >> I am trying to record from my microphone while i press do

[Tutor] Fwd: Re: Ubuntu install [was: Re: Fwd: Re: program code for Python Programming for the Absolute Beginner, 3rd ed.?]

2017-07-03 Thread Alan Gauld via Tutor
Forwarding to group. Please always use ReplyAll (or ReplyList) when responding to list emails. Forwarded Message I have a fresh install of Ubuntu 16.04.2, on which I try to install Python 3.6.1. I have done this multiple times in the past, but for some reason I tried it 3

Re: [Tutor] Fwd: Re: program code for Python Programming for the Absolute Beginner, 3rd ed.?

2017-07-03 Thread Cameron Simpson
On 03Jul2017 09:13, Alan Gauld wrote: [...] Sorry, I still have no idea what you are trying to do and what you want help with? Forwarded Message Alan, my bad, here is the error message. *The directory '/home/mariejosv/.cache/pip/http' or its parent directory is not owned by the

[Tutor] Fwd: Re: program code for Python Programming for the Absolute Beginner, 3rd ed.?

2017-07-03 Thread Alan Gauld via Tutor
forwarding to list. Sorry, I still have no idea what you are trying to do and what you want help with? Forwarded Message Alan, my bad, here is the error message. *The directory '/home/mariejosv/.cache/pip/http' or its parent directory is not owned by the current user and the ca

Re: [Tutor] Fwd: Re: Using files to read data

2017-06-27 Thread Mats Wichmann
On 06/27/2017 05:01 AM, Alan Gauld via Tutor wrote: > Forwarding to list > > Please always use ReplyAll or ReplyList when responding to list mail. > > > > Forwarded Message > > i apologize. i guess it didn’t attach correctly. > my issue is how do i get it out of my file and

Re: [Tutor] Fwd: Re: Using files to read data

2017-06-27 Thread Peter Otten
Alan Gauld via Tutor wrote: > Forwarding to list > > Please always use ReplyAll or ReplyList when responding to list mail. > > > > Forwarded Message > > i apologize. i guess it didn’t attach correctly. > my issue is how do i get it out of my file and use it. > > *the json

[Tutor] Fwd: Re: Using files to read data

2017-06-27 Thread Alan Gauld via Tutor
Forwarding to list Please always use ReplyAll or ReplyList when responding to list mail. Forwarded Message i apologize. i guess it didn’t attach correctly. my issue is how do i get it out of my file and use it. *the json file, its only about a fifth of it but it should ser

[Tutor] Fwd: Re: bottle: request.form.get()

2017-06-23 Thread Alan Gauld
Please always use ReplyAll when responding to the tutor list. (Or ReplyList if your mail client supports it) (Having said that I forgot to add the list - oops! :) On 22/06/17 19:48, adil gourinda wrote: > 1) I expected a well made documentaion that your The Python web site provides documentat

Re: [Tutor] Fwd: Re: How do I display a picture?

2017-05-17 Thread Alan Gauld via Tutor
On 18/05/17 00:38, Alan G via Tutor wrote: >Please always use reply all, or reply list when responding to list Oops, it seems like you did that already, my apologies. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my

[Tutor] Fwd: Re: How do I display a picture?

2017-05-17 Thread Alan G via Tutor
Please always use reply all, or reply list when responding to list messages. I think eryksun may have already answered your question, if not give more info about how you run your code. Original Message Subject: Re: [Tutor] How do I display a picture? From: Micha

Re: [Tutor] Fwd: Re: While Loop Question

2017-05-11 Thread Rafael Skovron
Thank you all I finally understood that the while code traps j and runs independently of the for loop until while is false and a new i is picked. On Thu, May 11, 2017 at 10:19 AM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > sorry j is set to zero. grave typo > > Abdur-Rahmaan Janha

Re: [Tutor] Fwd: Re: While Loop Question

2017-05-11 Thread Abdur-Rahmaan Janhangeer
sorry j is set to zero. grave typo Abdur-Rahmaan Janhangeer, Mauritius https://abdurrahmaanjanhangeer.wordpress.com On 11 May 2017 12:29 pm, "Abdur-Rahmaan Janhangeer" wrote: > > > -- Forwarded message -- > From: "Abdur-Rahmaan Janhangeer" > Date: 11 May 2017 12:26 pm > Subject

[Tutor] Fwd: Re: While Loop Question

2017-05-11 Thread Abdur-Rahmaan Janhangeer
-- Forwarded message -- From: "Abdur-Rahmaan Janhangeer" Date: 11 May 2017 12:26 pm Subject: Re: [Tutor] While Loop Question To: "Rafael Skovron" Cc: i modified your code to make it look like that : for i in range(1, 5): j=0 print("outer, i=",i) while j < i:

Re: [Tutor] Fwd: Re: Python 3.6 Extract Floating Point Data from a Text File

2017-05-01 Thread Alan Gauld via Tutor
On 01/05/17 15:54, Stephen P. Molnar wrote: > Unfortunately, I'm still missing something. Here is my latest attempt > to incorporate your solution: > name = input("Enter Molecule ID: ") > name = str(name) you don't need the str() since input() always returns whatever string the user enters. > name

[Tutor] Fwd: Re: Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread Alan Gauld via Tutor
How, embarrassing, I forgot to CC the list! :-) On 30/04/17 11:09, Stephen P. Molnar wrote: > I would have managed to extract input data from another calculation (not > a Python program) into the following text file. > > LOEWDIN ATOMIC CHARGES > -- > 0 C : -0.78063

[Tutor] Fwd: Startup Python

2017-04-14 Thread Wim Berrelkamp
Dear Alan Gauld, Pure by coïncedent I found your answer to me on the internet at http://code.activestate.com/lists/python-tutor/109848/ There was no answer on my e-mail account. Your answer works ! Thanks for that ! Regards, Wim Berrelkamp Groningen, The Netherlands On 12/04/17 13:47, Wim Berrel

Re: [Tutor] Fwd: RE: Fwd: Re: Sklearn

2017-03-11 Thread Alan Gauld via Tutor
> I want libraries that contain algorithms to check for relationships > within a dataset. For example, I want to parse through a SES dataset to > see any possible connections between student achievement and > socioeconomic standing, and correlate that to neighborhood wealth. Ok, With that backgro

Re: [Tutor] Fwd: RE: Fwd: Re: Sklearn

2017-03-11 Thread Matt Williams
Having done similar, the options are (depending on the dataset): 1: Python to read, clean and classify data, then R to do the analysis (e.g. regression analysis) 2: Python to read, clean and classify data, and python for the analysis 3: All in R If you want to use Python for the analysis, most

[Tutor] Fwd: RE: Fwd: Re: Sklearn

2017-03-10 Thread Alan Gauld via Tutor
-- Original message From: Alan Gauld via Tutor Date: 3/10/17 8:13 PM (GMT-05:00) To: tutor Subject: [Tutor] Fwd: Re: Sklearn Forwarding to list... Please use ReplyAll or ReplyList when responding to the tutor list. -- > I would like to carry statistical analy

  1   2   3   4   5   6   7   8   >