Re: [Tutor] Sam Kahraman Campus Middle School Advice

2018-04-26 Thread Zachary Ware
Hi Sam, On Thu, Apr 26, 2018 at 3:00 PM, Kahraman, Sam K. wrote: > Hello, > > I am a 8th grade student at Campus Middle School. We have a project on > coding and I need a expert to interview. Currently I'm learning Python and > thought I should ask someone who works their to Interview. To cont

[Tutor] Sam Kahraman Campus Middle School Advice

2018-04-26 Thread Kahraman, Sam K.
Hello, I am a 8th grade student at Campus Middle School. We have a project on coding and I need a expert to interview. Currently I'm learning Python and thought I should ask someone who works their to Interview. To contact me and ask any questions my email is skahra...@cherrycreekschools.org.

Re: [Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
On 04/26/2018 03:27 PM, Danny Yoo wrote: copy('~/Documents/Courses/ModernBootcamp/story.txt', '~/Documents/Courses/ModernBootcamp/story_copy.txt') Hi Jim, You may need to use os.path.expanduser, as "tilde expansion" isn't something that's done automatically. This is referenced in the docs wh

Re: [Tutor] Need help with FileNotFoundError

2018-04-26 Thread Danny Yoo
> copy('~/Documents/Courses/ModernBootcamp/story.txt', > '~/Documents/Courses/ModernBootcamp/story_copy.txt') Hi Jim, You may need to use os.path.expanduser, as "tilde expansion" isn't something that's done automatically. This is referenced in the docs when they say: "Unlike a unix shell, Pytho

[Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
Been working my way through an online Python course. Up until now I have had no problems writing and running the programs using Python 3.6 in a virtual environment and then pasting them into the courses editor. When I run this program on my system I get the following error. # file_io.py def

Re: [Tutor] Dict of Dict with lists

2018-04-26 Thread Neil Cerutti
On 2018-04-26, Alan Gauld via Tutor wrote: > OTOH its definitely not good OOP, ther are no methods and we > are just using the class as a record. (A named tuple might > actually be a better option on reflection.) namedtuple is great in lots of cases, but sometimes it transpires I wish to make alt

Re: [Tutor] Dict of Dict with lists

2018-04-26 Thread Alan Gauld via Tutor
On 26/04/18 14:48, Mats Wichmann wrote: >>> However personally I'd use a class to define your data structure and >>> just have a top level dictionary holding instances of the class. >> >> You are right (again). I haven't thougt of using classes, but that's exactly >> what they were invented for. T

Re: [Tutor] Dict of Dict with lists

2018-04-26 Thread Mats Wichmann
On 04/25/2018 12:46 PM, Kai Bojens wrote: > On 25/04/2018 –– 18:35:30PM +0100, Alan Gauld via Tutor wrote: >>> ... >>> for line in logfile: >>> result = pattern.search(line) > >> Doesn't this overwrite your data structure? >> I would strongly advise using another name. > > You are of