Skip to content

Instantly share code, notes, and snippets.

@teepark
Created November 20, 2014 23:05
Show Gist options
  • Save teepark/3e6ebf79cec09403c34e to your computer and use it in GitHub Desktop.
Save teepark/3e6ebf79cec09403c34e to your computer and use it in GitHub Desktop.
def write_all(fd, data):
while data:
written = os.write(fd, data)
data = data[written:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment