Python Forum
Still playing with text files (Jose Portilla on Udemy)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Still playing with text files (Jose Portilla on Udemy)
#3
Hi @knackwurstbagel! Thank you for reading and experimenting with my script. Your reply contains the solution that I needed. I know my script at this point is large so I appreciate your time, my friend.

I don’t understand the diff output you shared. So instead I just copied your new script into a new text file and then compared yours with mine using my favourite difftool, p4merge. With p4merge I was able to see the formatting and cosmetic changes where you indented some of my strings and such to make it easier to read.

I had realized that global variables should be used sparingly but I wasn’t sure how else to process the line number. However now that you have made the trivial change (at line 120), it is clear how straight forward the solution was. Instead of passing in the request (as I had it), you just passed in book[line_index]. That was easy enough! =)

I’ve taken a look at your link to PyBites’ blog post on how to use the Python debugger. I’m not sure I understand it fully yet. I already have alotta new questions. I’m gonna jump in now and I'll write a new forum thread here with some more questions if need be.

Thanks again!
Reply


Messages In This Thread
RE: Still playing with text files (Jose Portilla on Udemy) - by Drone4four - Oct-17-2019, 07:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  azure TTS from text files to mp3s mutantGOD 2 1,704 Jan-17-2023, 03:20 AM
Last Post: mutantGOD
  Writing into 2 text files from the same function paul18fr 4 1,680 Jul-28-2022, 04:34 AM
Last Post: ndc85430
  Delete empty text files [SOLVED] AlphaInc 5 1,568 Jul-09-2022, 02:15 PM
Last Post: DeaD_EyE
  select files such as text file RolanRoll 2 1,174 Jun-25-2022, 08:07 PM
Last Post: RolanRoll
  Two text files, want to add a column value zxcv101 8 1,924 Jun-20-2022, 03:06 PM
Last Post: deanhystad
  select Eof extension files based on text list of filenames with if condition RolanRoll 1 1,517 Apr-04-2022, 09:29 PM
Last Post: Larz60+
  Separate text files and convert into csv marfer 6 2,880 Dec-10-2021, 12:09 PM
Last Post: marfer
  Sorting and Merging text-files [SOLVED] AlphaInc 10 4,894 Aug-20-2021, 05:42 PM
Last Post: snippsat
  Replace String in multiple text-files [SOLVED] AlphaInc 5 8,143 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt
  Several pdf files to text mfernandes 10 5,839 Jul-07-2021, 11:39 PM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020