Python Forum
Python interpreter - output to file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python interpreter - output to file
#1
With the Python interpreter, analogous to the Command Prompt in windows, is there a way to export or write output to a file.

In looking at the code from the following link (about halfway down the page).
https://robbievanleeuwen.github.io/finit...-analysis/

There is this line of code which I want to write to file:

section.display_results()  # print the results to the terminal
Is there a way to do this?
The output consists of about 50-100 lines of data.
Reply


Messages In This Thread
Python interpreter - output to file - by SectionProperties - Apr-10-2020, 08:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,113 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Mac default python interpreter Viewpoint8455 2 928 Oct-13-2022, 06:25 AM
Last Post: perfringo
  Python Interpreter ankitdixit 4 2,708 Jun-10-2022, 12:37 PM
Last Post: katy1234
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,923 Mar-02-2022, 01:23 AM
Last Post: tomtom
  How to set Tab size to 4 in Python interpreter? zzzhhh 1 1,857 Jan-18-2022, 12:11 PM
Last Post: snippsat
  readline.parse_and_bind() does not work in start-up script of Python interpreter zzzhhh 0 1,531 Jan-18-2022, 11:05 AM
Last Post: zzzhhh
Photo how I write the output into xml file in python? 3lnyn0 1 2,246 Oct-31-2021, 05:40 PM
Last Post: Gribouillis
  Showing and saving the output of a python file run through bash Rim 3 2,477 Oct-06-2021, 10:48 AM
Last Post: gerpark
  PyCharm One Interpreter for every file? muzikman 3 1,873 Sep-28-2021, 02:09 AM
Last Post: snippsat
  python interpreter won't import packages greenpy 1 1,984 Sep-11-2020, 07:47 PM
Last Post: buran

Forum Jump:

User Panel Messages

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