3 Replies - 722 Views - Last Post: 01 May 2016 - 12:52 PM Rate Topic: -----

#1 starchief   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 07-February 16

missing modules

Posted 30 April 2016 - 04:59 PM

I got this book, Learning Python edition 5, the big book 1417 pages in all at page 229 on my Surface Kindle edition it says 'from formats import commas, money' is evidently old version stuff so I ultimately couldn't use it so I'm just skipping it, I hope this won't affect anything later for me, looks like the 'format' function or method or whatever it is should be good, I will find out I suppose. The Python sites has older versions in zip files that I try but didn't load. I got Python 2.7.11, 3.4.3, and 3.5.1 thats plenty for me.

Is This A Good Question/Topic? 0
  • +

Replies To: missing modules

#2 andrewsw   User is offline

  • no more Mr Potato Head
  • member icon

Reputation: 6957
  • View blog
  • Posts: 28,696
  • Joined: 12-December 12

Re: missing modules

Posted 01 May 2016 - 03:14 AM

Is there a question in there?

There isn't a 'formats' module in the Python Module Index (you can change the Python version to search in the drop-down list at the top-left). Are you sure this doesn't refer to a file that was built and saved earlier in the book, or needs to be downloaded from the book's site?

There is a formatter standard module listed, but it is deprecated since Python 3.4 and doesn't mention commas.
Was This Post Helpful? 0
  • +
  • -

#3 starchief   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 07-February 16

Re: missing modules

Posted 01 May 2016 - 12:43 PM

Well, I guess what it amounts to is the book is showing how to insert commas into a string of characters, in this case numbers. I saw the formatter in the list of modules in the help menu. These books always end up the same, I get to a spot where things won't run and I wonder what I missed and sometimes I have been able to fix the typo in the book by trying my own stuff, so that's part of the ongoing challenge of learning programming, and asking my questions correctly when I am not familiar with the language.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw   User is offline

  • no more Mr Potato Head
  • member icon

Reputation: 6957
  • View blog
  • Posts: 28,696
  • Joined: 12-December 12

Re: missing modules

Posted 01 May 2016 - 12:52 PM

If it helps, I find it reassuring to be able to spot mistakes in the code, it means that I'm understanding what I'm typing. It is always worth bookmarking the errata page though.

I would check the early, introductory, chapters to see if this module is mentioned anywhere, perhaps as an offered download from the author's site, or sometimes we are referred to a small section at the end of the book. (It seems unlikely that you would miss the creation of this module, in code shown in book, if you've been reading through it chapter by chapter.)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1