As configured in my dotfiles.
start new:
tmux
start new with session name:
| import os | |
| from setuptools import find_packages, setup | |
| ## setup.py | |
| def main(): | |
| def read(fname): | |
| with open(os.path.join(os.path.dirname(__file__), fname)) as _in: | |
| return _in.read() | |
| setup( |
| class Database(object): | |
| def _print(self): | |
| print('Database class') | |
| class Local(object): | |
| def _print(self): | |
| print('Local class') | |
| class BaseThing(object): | |
| def __init__(self): |
| class MutableClass(): | |
| def __init__(self): | |
| self.thing = [] # mutable | |
| self.nonething = None | |
| def fn(self, new): | |
| self.thing.append(new) | |
| self.nonething = new | |
| m, m2 = MutableClass(), MutableClass() |
| # https://docs.python.org/3/library/unittest.mock.html | |
| from unittest.mock import MagicMock, Mock | |
| from nose.tools import assert_equal, raises, assert_true, assert_raises | |
| class A(): | |
| def __init__(self): | |
| self.item = 'item' | |
| def return_item(self, thing = None): | |
| if not thing: |
As configured in my dotfiles.
start new:
tmux
start new with session name: