Skip to content

Instantly share code, notes, and snippets.

from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = ['Country']
class Country(metaclass=PoolMeta):
__name__ = 'country.country'
@htgoebel
htgoebel / test_pyzmq.py
Last active August 29, 2015 14:13
Minimal example for pyzmq, usable as test-case.
import threading
import uuid
import time
import zmq
def sender(send_addr, receiver_port):
send_socket = ctx.socket(zmq.REQ)
address = "tcp://{addr}:{port}".format(addr=send_addr, port=receiver_port)