Skip to content

Instantly share code, notes, and snippets.

@vpetrigo
Created July 20, 2017 23:47
Show Gist options
  • Save vpetrigo/4c9d0a7d5cfbeccf4cca60445a86846c to your computer and use it in GitHub Desktop.
Save vpetrigo/4c9d0a7d5cfbeccf4cca60445a86846c to your computer and use it in GitHub Desktop.
Stepik Linux Week 3 Task 2 test script
#!/usr/bin/env python3
# coding=utf-8
import os
fd = os.open("/dev/solution", os.O_RDWR | os.O_NOCTTY)
test = open(fd, "wb+", buffering=0)
test.write(b"Hello")
data = test.read()
print(data)
data = test.read()
print(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment