Write To File Python

\files\TestXMLRoutine' /* we then insert a row into the table from the XML variable */ /* so we can then write it. If “” (empty), a binary file is written, equivalent to file. But in our case we. Python file read/write is so simple (even for an absolute beginner) that I have no idea what answer you may need, except perhaps writing the code for you. To create and write to a new file, use open with “w” option. Any language that supports text file input and string manipulation (like Python) can work with CSV files directly. After Python 2. Python open() function to perform read/write operations in files In order to perform input/output (I/O) operations in files, you have to open a file. Excel files can be created in Python using the module Pandas. reader() module. As George properly noted, you should do sudo bash -c "python myFile. To open a file for binary writing is easy, it is the same way you do for reading, just change the mode into "wb". dump() offers several customizations in the serialization process. The join method (called on a given string) can be used to concatenate a list of strings. bin in MS Office 2007+ files, Image Composer and FlashPix files, Outlook MSG files, StickyNotes, several Microscopy file formats, McAfee antivirus. Load pickled pandas object (or any object) from file. File Writing In Python Similarly, for writing data to files, we have to use open() with ' wt ' mode, clearing and overwriting the previous content. This is followed by closing the file and reopening in the write mode by using the ‘w’ value. Python is an interpreted programming language that has the potential to create programs in all operating systems. CSV is a common format for data interchange as it's compact, simple and general. It is an ideal way to write data and format information to files with. Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written. If the encoding is something other than 'bytes' or 'latin1' you will not be able to load the file in NumPy versions < 1. Now in Python 3. For example, consider a Python program. Reading a file. Here's a sample Python. py 1>/dev/null # stdout redirected line 1e to stderr # Only stderr appears on console. These examples show various ways to write text to a file. The list of values looks like res=(1,2,3,,x). py files that consist of Python code. The syntax and parameters for the write object are very similar to the syntax for the read object. If instead the flag is set to MultipleFiles, a new. The simplest way to write configuration files is to simply write a separate file that contains Python code. Web Development Courses: https://prettyprinted. Read the file in Python. Binary files: executable files, images, audio etc. CSV files have the advantage that they are easy to process, and can be even read directly with a text editor. Importing data from other file types. write method takes a string as argument, writelines takes a list. If your intention is to add multiple lines at different parts of the file, or even different files, but only 1 task, then you can use lineinfile along with the with_items structure. It is an ideal way to write data and format information to files with. The write function adds a string to the end of the file. reading and writing list data in SharePoint 2010 using SPServices Isolated Storage in. File Writing In Python Similarly, for writing data to files, we have to use open() with ' wt ' mode, clearing and overwriting the previous content. write(24) Out. CSV files have the advantage that they are easy to process, and can be even read directly with a text editor. In order to open a file for writing or use in Python, Mode. After you’ve ridden the digital wave of the future and ripped a number of MP3 files, you’re ready to enjoy them. Instead of typing commands in one-by-one you can save your code to a file and pass the file name to the python program. I'm fairly new to python so any help on this would be great. Writing a string or sequence of bytes (for binary files) is done. This installation may take a few minutes. jpg extension and the create a new text file with the new. close() I get this error: Traceback (most recent call last): File 123. How to Reverse a String in Python – An overview of the three main ways to reverse a Python string: “slicing”, reverse iteration, and the classic in-place reversal algorithm. Now you can save a string or text to a file in persistent data storage. Preparing your workspace is one of the first things Testing the Python Script. 6' writer = csv. As George properly noted, you should do sudo bash -c "python myFile. This action is also referred to as "truncating" a file. All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel. This tutorial will give a detailed introduction to CSV’s and the modules and classes available for reading and writing data to CSV files. The content should look like this: HTML Source Generated by Python Program. The ‘w’ flag makes Python truncate the file if it already exists. Reading/Writing to CSV in Matlab Posted on April 6, 2014 April 6, 2014 by mrsoltys When doing data analysis, many times your input will come in a. Format string for text file output. Note that this is only possible in Binary mode. How to save the import csv file to mongodb. If you need to modify a file, you'll have to open the file again in write mode, which does an overwrite, not an append. The python program written above will open a csv file in tmp folder and write the content of JSON file into it and close it at the end. line 2 to stdout line 3 to stdout line 1e to stderr line 2e to stderr line 3e to stderr $ python3. We can print some data types directly, but most of that can be printed out by the print statement in a straightforward way. But in a more general sense, it doesn't work with the COM interface either (where Excel itself is invoked behind the scenes, just like in Matlab). An Intro to pyfpdf - A Simple Python PDF Generation Library July 10, 2012 Python Python PDF Series Mike Today we'll be looking at a simple PDF generation library called pyfpdf , a port of FPDF which is a php library. Finally, you can write a program to extract zip files to disk in just a few lines. How to write to File Using Python? In order to write into a file in Python, we need to open it in write 'w', append 'a' or exclusive creation 'x' mode. In this tutorial, you will learn how to create a simple python script that makes use of the logging python standard library in order to write log messages to a file. The following example shows the usage of write() method. In python, while processing the I/O operation of various types( like the text I/O, binary I/O and raw I/O. Alternatively, the Python standard library comes with a CSV module that made it even easier to read/write data in CSV format. StringIO or io. gitignore file to avoid uploading it accidentally. Open ( ) Function. Read a Text File Line by Line Using While Statement in Python Here is the way to read text file one line at a time using "While" statement and python's readline function. CSV files have the advantage that they are easy to process, and can be even read directly with a text editor. i want to insert every new piece of text into the next row. Non-Programmer's Tutorial for Python 2. If we run the. How to: Write to a Text File (C# Programming Guide) 07/20/2015; 2 minutes to read +5; In this article. In this example, first I opened the text file with 'r' argument value for mode i. Another file out. This article is part of a series of articles relating to data storage with Python. Note that this is only possible in Binary mode. A CSV file is a human readable text file where each line has a number of fields, separated by commas or some other. To do this without creating a new file, you must store line + the additional characters in e. It complements pdfrw extremely well, supporting many operations such as decryption and decompression that pdfrw cannot do. python-docx¶. Writing a module is just like writing any other Python file. In OpenCV, a video can be read either by using the feed from a camera connected to a computer or by reading a video file. FontForge implements two Python modules -- one great huge one called fontforge which provides access to as much of FontForge's functionality as I've had time to write, and one tiny one called psMat which provides quick access to some useful transformations expressed as PostScript matrices. We are going to use the Write() function. exe is in a directory named Python, which in turn is contained in a directory named Program Files on my D-drive. Exit the command line and write the data. Python File Write Write to an Existing File To write to an existing file, you must add a parameter to the open() function: "a" - Append - will append to the end of the file. Download the compressed files for Unit 3 from the Resources link at the top of this page, extract the files to a Source directory then copy the files simpleread. bat file into the folder where you want the contents printed and double-click the file. txt and another file named test. In this post, I'll describe the structure of this file format and how to access it easily in python. Load the file into your Python workbook using the Pandas read_csv function like so: Load CSV files into Python to create Pandas Dataframes using the read_csv function. Those written in Python and I can outline their behavior. The Pandas functionalities to read and write Excel files use the modules 'xlrd' and 'openpyxl'. The for loop in python iterates at each element in the list. txt is opened in writing mode. > I am not that good, yet, but will try. echo "$(echo 'task goes here' | cat - todo. You can configure your logging system in Python code, but then you need to modify your code whenever you want to change the log configuration. These functions are open() and write(). writer function or the Dict Writer class. reader() module and also has two methods, i. In the following, the data you want to write to a VTK file are supposed to arise from scipy/numpy arrays. Now, open up the Python IDLE program (should be in your start menu). py and numbers. Python Forums on Bytes. If I were to simply request the data (name age location) without the commas however, then each record, when written to. py file indicates that the pyimagesearch directory is a Python module that can be imported into a script. The problem here sudo python myFile. In Python, there is no need for importing external library to read and write files. A script that looks like. And here is the full Python code:. Python write string to file. I would really like you help to solve the following problem using Python. reader() module and also has two methods, i. It accepts an array of files. That covers the basic reading methods for files. Application of Python in Meteorology. This site contains pointers to the best information available about working with Excel files in the Python programming language. An Intro to pyfpdf - A Simple Python PDF Generation Library July 10, 2012 Python Python PDF Series Mike Today we'll be looking at a simple PDF generation library called pyfpdf , a port of FPDF which is a php library. opening the text file in read mode for showing the existing content. path module has lots of tools for working around these kinds of operating system-specific file system issues. File Handling File handling in Python requires no importing of modules. Python dictionary Saving to a JSON file. txt and write in it using python. How to read and write a CSV files. Here is what I have so far. We can use this module to load any JSON formatted data from a string or a file, as the following code example describes:. From the module we import ExcelWriter and ExcelFile. Let me just start this blog post by saying that writing to video with OpenCV can be a huge pain in the ass. The open() function takes two parameters; filename, and mode. Python's os. txt is opened in writing mode. Write object to an Excel sheet. Write to an Existing File. py file indicates that the pyimagesearch directory is a Python module that can be imported into a script. Directory is an old name for a folder. Here's an example script that I wrote to answer some specific questions concerning access to our course description directory on our web server, where we get a new log file several megabytes long each day and it can be hard to see the data you might be. The next step is to create a data frame. Python-pptx can create blank PowerPoint files but most people are going to prefer working with a predefined template that you can customize with your own content. txt' , 'wb' ) and to then call the write method to write to the file:. If you don't do this, the file is not written to Cloud Storage. How about writing individual bytes back in? As with most things in Python, it's both very easy and also kind of weird. The best way to follow along with this article is to go through the accompanying Jupyter notebook either on Cognitive Class Labs (our free JupyterLab Cloud environment) or downloading the notebook from GitHub and running it yourself. What you may know as a file is slightly different in Python. write method takes a string as argument, writelines takes a list. That covers the basic reading methods for files. The join method (called on a given string) can be used to concatenate a list of strings. An example of Python write to file by 'w' value. The problem here sudo python myFile. str − This is the String to be written in the file. Reading a file. txt", "w"). Create a folder to hold our demo todo list and our Ruby program. Key (str) -- The name of the key to download from. In Amazon S3, the user has to first create a. Read a Text File Line by Line Using While Statement in Python Here is the way to read text file one line at a time using “While” statement and python’s readline function. We need to be careful with the 'w' mode as it will overwrite into the file if it already exists. It is an ideal way to write data and format information to files with. writer() module. You can load it all into memory and write it back out to the file. The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. Let’s take a look at an example code file. Excel files can be created in Python using the module Pandas. to_parquet Write a DataFrame to the binary parquet format. html in your browser, to see what it looks like. When I write to two files in python, the second one is always empty Tag: python , file-io I'm working on a simple python script to write some data to two text files. The initial file position for reading is at the beginning of the file, but output is appended to the end of the file. In Python you have the print statement, which also silently appends a linefeed (unless you end the statement with a comma). 10 (Installation)python-docx is a Python library for creating and updating Microsoft Word (. writer function or the Dict Writer class. Yesterday, we told you about File I/O in Python. StringIO or io. Please refer this post for more details. I have this lists a=[1,3,5,6,10], b=[a,t,q,r,s] and I need to export it to a txt file and I can't use csv. Also, the f. In Python, there is no need for importing external library to read and write files. You might want to call it something like databaseconfig. zip files from Archive folder and processes into work folder and finally pushes the masked. On my machine, the file named python. I want to write an int to a file instead of a char so my cpp program can read it easier. We need to be careful with the 'w' mode as it will overwrite into the file if it already exists. Tip: if you want to learn more about importing files in Python, check out DataCamp's Importing Data in Python course. Suppose you have a dictionary of names mapped to emails, and you want to create a CSV like the one in the above example. Let’s start off by downloading this data file, then launching IPython the directory where you have the file:. This method returns the number of characters written to the file. Pandas writes Excel files using the Xlwt module for xls files and the Openpyxl or XlsxWriter modules for xlsx files. If the text file is small enough to fit in memory, you don't have to create a temporary file to replace it with. Alternatively, the Python standard library comes with a CSV module that made it even easier to read/write data in CSV format. Any Python file can be referenced as a module. txt When the version number is contained within a larger file, e. reader() module and also has two methods, i. Python allows you to read, write and delete files; Use the function open("filename","w+") to create a file. One advantage of using CSV format, is you can open a CSV file with any spreadsheet software such as Microsoft Excel for visualization and data analysis. The bytes type in Python is immutable and stores a sequence of values ranging from 0-255 (8-bits). to_hdf Write DataFrame to an HDF5 file. Create a new file and write, for example, a function that sums two numbers and returns the result. the same folder that the Python program is saved in. In this tutorial we're going to cover the basics of writing to a file. In this article, we will focus on how to use Amazon S3 for regular file handling operations using Python and Boto library. To output the data to a separate text file, use the SQLite command prompt and switch the output parameter to send any of the queried data to the file. When I write to two files in python, the second one is always empty Tag: python , file-io I'm working on a simple python script to write some data to two text files. Importing data from other file types. An example of Python write to file by ‘w’ value. The write() function, writes to the file. The write() function takes string as the argument. In this example, first I opened the text file with ‘r’ argument value for mode i. Let’s insert a new project into the projects table and some tasks into the tasks table that we created in the creating tables from a Python program tutorial. In Python, this can be done using the module json. This module is similar to the csv. To create a text file in Python you will need to work with file object of Python. # open a (new) file to write outF = open("myOutFile. writer() module to write data into csv files. Now you can install Python 3 by running brew install python3. Then open that file if exist, or create a file with that name and again ask from the user to enter some line of sentences to put those sentences into that file as the content of the file. Double-clicking an MP3 file on your Desktop or within File Explorer loads. Python makes tasks like this fairly trivial, but I like to experiment a bit so rather than just write a loop appending each file I wrote a class to do it with some methods. python, trying to write multiple variables to a file on single line Trying to capture 2 variables from user input, then write them to a file on the same line. Since this tutorial is about writing in the text file so I am not covering these values for the mode parameter. We on't need to import any external library as it is an built-in function. An example of Python write to file by ‘w’ value. write to csv file? I attempted to write a library for CSV file creation for my MyTrack project. , writerow() and writerows(). The raw_input([prompt]) function reads one line from standard input and returns it as a string (removing the trailing newline). zip files from Archive folder and processes into work folder and finally pushes the masked. Here, you will learn how to read and write to the physical file in Python. Output: something to be write. For example: Python. An Intro to pyfpdf – A Simple Python PDF Generation Library July 10, 2012 Python Python PDF Series Mike Today we’ll be looking at a simple PDF generation library called pyfpdf , a port of FPDF which is a php library. The for loop in python iterates at each element in the list. The join method (called on a given string) can be used to concatenate a list of strings. csv file or. You can use os. You might want to call it something like databaseconfig. Writing CSV files to Object Storage (also in Python of course). tostring() is implemented to write to an in-memory file-like object and then return a string representing the entire element tree. It should be noted that there are two methods for saving data to a file, and those are writing and appending. txt", "w") as f: f. Using Python: How To Check If A File Exists If you find yourself doing any kind of disk-based I/O with Python, you'll undoubtedly come across the need to verify that a file exists before continuing to read/write against it. #!/usr/bin/python str = raw_input. There is a reason for the depth of the content, a lot has changed in the last few years and computers are. Now create a text file called test_list. What is the best and the simplest way for Reading from and writing to Excel files in C++?I'll appreciate if anybody can help me. The Apache Parquet project provides a standardized open-source columnar storage format for use in data analysis systems. Writing csv files. ) many time we deal with the data stream(a file-like object). The PowerShell way uses a single cmdlet called Set-Content. We can use the read () method to read what’s in a Python file. the same folder that the Python program is saved in. To write an object to a file, you. Let's take a look at an example code file. 'b' appended to the mode opens the file in binary mode: now the data is read and written in the form of bytes objects. Python provides inbuilt functions for creating, writing and reading files. txt", "w") as f: f. In this article, we will focus on how to use Amazon S3 for regular file handling operations using Python and Boto library. Python-pptx’s API supports this process quite simply as long as you know a few things about your template. Write a Python program to accept a filename from the user and print the extension of that file. When working with large amounts of data, it will take less memory and make more efficient use of the I/O libraries to write directly to a file handle using the write() method of ElementTree. File Writing. So, I have seven tab delimited files, each file has the exact number and name of the columns but different data of each. The csv library provides functionality to both read from and write to CSV files. Save the dataframe called "df" as csv. txt", "w") as f: f. Each of these modules are already installed on Carter and Conte. 2 (192 ratings) Course Ratings are calculated from individual students' ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately. (Provided no one else has access to the pickle file, of course. Its argument can be either the device index or the name of the video file to be read. Be aware that after you call close, you cannot append to the file. Click 'File > Open' and find mary. Step 2: Write string to the file using write() method. Python dictionary Saving to a JSON file. It is similar to csv. Hopefully it will help many developers learn how to export Excel files in a Python/Django properly. If you need to modify a file, you'll have to open the file again in write mode, which does an overwrite, not an append. Write to a Google Spreadsheet from a Python script. Some of them. As George properly noted, you should do sudo bash -c "python myFile. csv', 'wb')) writer. How to save the import csv file to mongodb. Beginners are those who begin. Step 2: Write string to the file using write() method. It is used extensively in different operations from data copying to data mining and data analysis by computer operators to data analysts and data scientists. The ‘w’ flag makes Python truncate the file if it already exists. Using xlwt module, one can perform multiple operations on spreadsheet. This tutorial shows a guide on how to write excel file using Python. We'll use a couple of simple scripts from the Python Samples folder as examples - we'll dissect these to see how they work. These modules are not automatically installed by Pandas, so you may have to install them manually!. We'll use a couple of simple scripts from the Python Samples folder as examples - we'll dissect these to see how they work. Amazon S3 and Workflows. It was created by Jeff Kunce and then modified by Hans Fiby. In Python, open the file as both readable and writable without overwriting it. Work with dictionaries and JSON data in python. 4 Distribution. Let's take a look at an example code file. Python File i/o & File Read and Write. Python is a great tool for processing data. When we use C/C++, we can save other datatype (ex. bat; To show the contents of a directory (folder) in a text file, simply copy or move the File List Generator. py file indicates that the pyimagesearch directory is a Python module that can be imported into a script. The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. (6 replies) i ahve a program that takes certain textsnippets out of one file and inserts them into another. No problem. These ideas go back far enough to the time before directories got a graphical folder representation. dump() offers several customizations in the serialization process. [code]def out_fun(): return "Hello World" output = out_fun() file = open("sample. This tutorial shows a guide on how to write word file using Python. Before I begin the topic, let's define briefly what we mean by JSON. It was created by Jeff Kunce and then modified by Hans Fiby. In this post, I'll describe the structure of this file format and how to access it easily in python. The simplest way to write configuration files is to simply write a separate file that contains Python code. Python - Write String to Text File. Since we read one line at a time with readline , we can easily handle big files without worrying about memory problems. These ideas go back far enough to the time before directories got a graphical folder representation. #!/usr/bin/python str = raw_input. To open a file for binary writing is easy, it is the same way you do for reading, just change the mode into "wb". This behind-the-scenes modification to file data is fine for ASCII text files, but it’ll corrupt binary data like that in JPEG or EXE files. write("text\n") [/code]Is. Next: Write a Python program to copy the contents of a file to another file. Using xlwt module, one can perform multiple operations on spreadsheet. Writing CSV files is just as straightforward, but uses different functions and methods. reader() module and also has two methods, i. Today we will see File Handling in Python in which we study: Python Read file, Python Write File, Python Open File, and Python Close File. Python - Tell and Seek. Text files: Python source code, HTML file, text file, markdown file etc. Python Write To File Line By Line: Python Write To File Line By Line Using writelines(): Here in the first line, we defined a list in a variable called 'numbers'. The fact-checkers, whose work is more and more important for those who prefer facts over lies, police the line between fact and falsehood on a day-to-day basis, and do a great job. Today, my small contribution is to pass along a very good overview that reflects on one of Trump’s favorite overarching falsehoods. Namely: Trump describes an America in which everything was going down the tubes under  Obama, which is why we needed Trump to make America great again. And he claims that this project has come to fruition, with America setting records for prosperity under his leadership and guidance. “Obama bad; Trump good” is pretty much his analysis in all areas and measurement of U.S. activity, especially economically. Even if this were true, it would reflect poorly on Trump’s character, but it has the added problem of being false, a big lie made up of many small ones. Personally, I don’t assume that all economic measurements directly reflect the leadership of whoever occupies the Oval Office, nor am I smart enough to figure out what causes what in the economy. But the idea that presidents get the credit or the blame for the economy during their tenure is a political fact of life. Trump, in his adorable, immodest mendacity, not only claims credit for everything good that happens in the economy, but tells people, literally and specifically, that they have to vote for him even if they hate him, because without his guidance, their 401(k) accounts “will go down the tubes.” That would be offensive even if it were true, but it is utterly false. The stock market has been on a 10-year run of steady gains that began in 2009, the year Barack Obama was inaugurated. But why would anyone care about that? It’s only an unarguable, stubborn fact. Still, speaking of facts, there are so many measurements and indicators of how the economy is doing, that those not committed to an honest investigation can find evidence for whatever they want to believe. Trump and his most committed followers want to believe that everything was terrible under Barack Obama and great under Trump. That’s baloney. Anyone who believes that believes something false. And a series of charts and graphs published Monday in the Washington Post and explained by Economics Correspondent Heather Long provides the data that tells the tale. The details are complicated. Click through to the link above and you’ll learn much. But the overview is pretty simply this: The U.S. economy had a major meltdown in the last year of the George W. Bush presidency. Again, I’m not smart enough to know how much of this was Bush’s “fault.” But he had been in office for six years when the trouble started. So, if it’s ever reasonable to hold a president accountable for the performance of the economy, the timeline is bad for Bush. GDP growth went negative. Job growth fell sharply and then went negative. Median household income shrank. The Dow Jones Industrial Average dropped by more than 5,000 points! U.S. manufacturing output plunged, as did average home values, as did average hourly wages, as did measures of consumer confidence and most other indicators of economic health. (Backup for that is contained in the Post piece I linked to above.) Barack Obama inherited that mess of falling numbers, which continued during his first year in office, 2009, as he put in place policies designed to turn it around. By 2010, Obama’s second year, pretty much all of the negative numbers had turned positive. By the time Obama was up for reelection in 2012, all of them were headed in the right direction, which is certainly among the reasons voters gave him a second term by a solid (not landslide) margin. Basically, all of those good numbers continued throughout the second Obama term. The U.S. GDP, probably the single best measure of how the economy is doing, grew by 2.9 percent in 2015, which was Obama’s seventh year in office and was the best GDP growth number since before the crash of the late Bush years. GDP growth slowed to 1.6 percent in 2016, which may have been among the indicators that supported Trump’s campaign-year argument that everything was going to hell and only he could fix it. During the first year of Trump, GDP growth grew to 2.4 percent, which is decent but not great and anyway, a reasonable person would acknowledge that — to the degree that economic performance is to the credit or blame of the president — the performance in the first year of a new president is a mixture of the old and new policies. In Trump’s second year, 2018, the GDP grew 2.9 percent, equaling Obama’s best year, and so far in 2019, the growth rate has fallen to 2.1 percent, a mediocre number and a decline for which Trump presumably accepts no responsibility and blames either Nancy Pelosi, Ilhan Omar or, if he can swing it, Barack Obama. I suppose it’s natural for a president to want to take credit for everything good that happens on his (or someday her) watch, but not the blame for anything bad. Trump is more blatant about this than most. If we judge by his bad but remarkably steady approval ratings (today, according to the average maintained by 538.com, it’s 41.9 approval/ 53.7 disapproval) the pretty-good economy is not winning him new supporters, nor is his constant exaggeration of his accomplishments costing him many old ones). I already offered it above, but the full Washington Post workup of these numbers, and commentary/explanation by economics correspondent Heather Long, are here. On a related matter, if you care about what used to be called fiscal conservatism, which is the belief that federal debt and deficit matter, here’s a New York Times analysis, based on Congressional Budget Office data, suggesting that the annual budget deficit (that’s the amount the government borrows every year reflecting that amount by which federal spending exceeds revenues) which fell steadily during the Obama years, from a peak of $1.4 trillion at the beginning of the Obama administration, to $585 billion in 2016 (Obama’s last year in office), will be back up to $960 billion this fiscal year, and back over $1 trillion in 2020. (Here’s the New York Times piece detailing those numbers.) Trump is currently floating various tax cuts for the rich and the poor that will presumably worsen those projections, if passed. As the Times piece reported: