Python Forum
readline inside and outside functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
readline inside and outside functions
#1
Hi

Because of the size of files I'm working on (often more than a billion lines for example), and the number of different types of data to be recorded (specific width and so on), I've been using "with open" + "readline" (without the end "s");

The main difficulty I'm confront is that all "readline" must remain into the core of the program (and I've now more than a thousand lines to take into account all specificities even using functions when it's possible). Does it make sense to envisage continuing using "readline" into functions and then returning to the core of the program (? if so, how to proceed?

Thanks for your feedback
Reply


Messages In This Thread
readline inside and outside functions - by paul18fr - May-20-2021, 12:33 PM
RE: readline inside and outside functions - by csr - May-20-2021, 01:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pyserial Readline() conversion to array bprosman 1 3,540 Apr-11-2023, 12:44 AM
Last Post: deanhystad
  Greek letters with .readline() and tkinter KinkgOfKeks 7 3,499 Mar-24-2023, 05:13 PM
Last Post: deanhystad
Star Pyserial not reading serial.readline fast enough while using AccelStepper on Arduino MartyTinker 4 8,450 Mar-13-2023, 04:02 PM
Last Post: deanhystad
  readline.parse_and_bind() does not work in start-up script of Python interpreter zzzhhh 0 2,171 Jan-18-2022, 11:05 AM
Last Post: zzzhhh
  Python Dev suggestion: Combining line-wrap with comments inside functions NikoNiels 2 2,347 Sep-26-2020, 07:45 PM
Last Post: bowlofred
  TypeError: file must have 'read' and 'readline' attributes hobbyist 6 14,748 Jun-12-2020, 05:12 PM
Last Post: DreamingInsanity
  User defined functions inside other user defined functions WildP 1 2,530 Jan-29-2020, 04:57 PM
Last Post: Clunk_Head
  problem with readline() schlundreflex 6 6,366 Nov-06-2019, 02:22 PM
Last Post: schlundreflex
  readline() and readlines() rpaskudniak 9 38,869 Nov-21-2017, 07:39 PM
Last Post: metulburr
  Empty variable when using print before readline fstefanov 3 4,516 Oct-23-2017, 02:22 AM
Last Post: fstefanov

Forum Jump:

User Panel Messages

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