You can use flush()
or you can set the file object to be unbuffered.
Details on using that parameter for open()
here.
So you would change your open call to –
outputFile = open("./outputFile.txt", "a", 0)
More Related Contents:
- Change sign of elements with an odd sum of indices
- How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte”
- Writing a Python list of lists to a csv file
- How to write a Python module/package?
- How to scroll the background surface in PyGame?
- Python: pop from empty list
- Check if a string in a Pandas DataFrame column is in a list of strings
- Can Python pickle lambda functions?
- Naturally sorting Pandas DataFrame
- How To Get All The Contiguous Substrings Of A String In Python?
- is it possible to run pygame or pyglet in a browser?
- Selenium – MoveTargetOutOfBoundsException with Firefox
- importing a module when the module name is in a variable [duplicate]
- Is it safe to use the python word “type” in my code?
- What is the Python ‘buffer’ type for?
- OverflowError Python int too large to convert to C long
- Test if an internet connection is present in python
- UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-5: ordinal not in range(128) [duplicate]
- How to apply a function to each sublist of a list in python?
- python 2.7 equivalent of built-in method int.from_bytes
- Printing on the same line with time.sleep()
- How to use PyCharm to debug Scrapy projects
- Python 2.7 on Ubuntu
- Enforcing python version in setup.py
- Type error Unhashable type:set
- What is the easiest way to achieve realtime plotting in pyqtgraph
- How to convert integers in list to string in python
- Upload file with Selenium Webdriver Python
- Why does using from __future__ import print_function breaks Python2-style print? [closed]
- Python – reference inner class from other inner class