Not the straight forward way, but probably much faster than a simple Python implementation:
line = subprocess.check_output(['tail', '-1', filename])
More Related Contents:
- Why is this basic python program not working?
- How to replace multiple substrings of a string?
- How can I create a text input box with Pygame?
- How to modify a text file?
- Extracting text from HTML file using Python
- Matplotlib scatter plot with different text at each data point
- Is there a way to convert number words to Integers?
- Create Pandas DataFrame from txt file with specific pattern
- How to read a text file into a list or an array with Python
- How to highlight text in a tkinter Text widget
- How to split text without spaces into list of words
- Print string to text file
- Check if string contains only whitespace
- How can I escape latex code received through user input?
- Delete final line in file with python
- Remove very last character in file
- Searching text in a PDF using Python?
- In Python, how do I decode GZIP encoding?
- PIL – draw multiline text on image
- How to easily print ascii-art text? [closed]
- How to count the number of words in a sentence, ignoring numbers, punctuation and whitespace?
- Add advanced features to a tkinter Text widget
- How to scrape only visible webpage text with BeautifulSoup?
- Is there a Python module for converting RTF to plain text? [closed]
- Is there a way to make the Tkinter text widget read only?
- Python – Finding word frequencies of list of words in text file
- How to display text on the screen without a window using Python
- Find text position in PDF file
- How to process huge text files that contain EOF / Ctrl-Z characters using Python on Windows?
- automatically position text box in plot