paint-brush
The Status of a North Korean: A Short Story Told in Pythonby@offcode
595 reads
595 reads

The Status of a North Korean: A Short Story Told in Python

by Adam SchmidegNovember 22nd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

How do you write to your family from a country where censorship prevails? Hide your message in source code.
featured image - The Status of a North Korean: A Short Story Told in Python
Adam Schmideg HackerNoon profile picture
try:
    from countries.asia import *
except ImportError:
    pass


class Status:

    def __init__(self):
        self.location = NorthKorea()
        self.reader.location = None

    def query(self):
        for child in self.children:
            child.check_status()
            child.request_photo(upload_url)
            # 1000 could be made a constant, but it may change
            if distance(child.location, self.location) >= 1000:
                self.sigh()

    def report_status(self):
        return OK

    def get_contact(self):
        candidate = self.friends[BOOKWORM]
        if candidate in self.reader.cache:
            return candidate
        for member in self.family:
            if member.location in NorthKorea.provinces.Kangwon:
                candidates.append(member)
        if candidates:
            return candidates[0]
        else:
            return None

    def connect(self, reader):
        from __future__ import views
        try:
            from __future__ import transport
        except:
            raise InternalError()

        while distance(self, reader) > 0:
            try:
                transport.move(self, direction=reader.location)
            except FloatingPointError:
                continue


# Note: this is untested code, be careful when running it in live environment
with open(eyes) as sensory_input:
    if sensory_input.detect_third_party():
        logging.warn(sensory_input)
    else:
        try:
            reader.connect(self)
        except ConnectionError:
            break