Skip to content

Instantly share code, notes, and snippets.

View ionelmc's full-sized avatar
🙃
wat

Ionel Cristian Mărieș ionelmc

🙃
wat
View GitHub Profile
@ionelmc
ionelmc / trololo.log
Created January 6, 2015 12:54
About setuptools
14:46 <ssbr`> nedbat: looks like this will do the right thing by munging sys.path
14:46 <ssbr`> *sighhhh*
14:47 <ssbr`> _habnabit: fine whatever you win, setuptools, woo
14:47 saschpe → zz_saschpe
14:47 — ssbr` cheers halfheartedly. quarterheartedly. notheartedly.
14:47 → Avaris and linux-fox joined ⇐ ruukasu and zoso quit
14:48 <nedbat> ssbr`: there's a reason people use setuptools
14:48 ⇐ linux-fox quit (~netinvman@122.156.252.10) Client Quit
14:48 <ionelmc> ssbr`: past setuptools trauma?
14:48 <ssbr`> ionelmc: I've spent years helping people debug setuptools' mistakes and overall crappiness
@ionelmc
ionelmc / gist:0e778de90ac75b5f003a
Last active August 29, 2015 14:06
My packages on PyPI
aspectlib
cogen
django-admin-customizer
django-admin-utils
django-customfields
django-easyfilters-ex
django-monkey-team
django-prefetch
django-redisboard
django-secdownload-storage
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/paper.js/0.9.12/paper.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
<style id="jsbin-css">
asdfsadfadsf
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/paper.js/0.9.12/paper.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<script src="http://ionelmc.github.io/polymer-json-box/bower_components/platform/platform.js"></script>
<script src="http://ionelmc.github.io/polymer-json-box/bower_components/polymer/polymer.js"></script>
<meta charset="UTF-8">
<style>
</style>
</head>
<body unresolved>

T.__init__ doesn't get called, as it's the second last in the mro (because it doesn't inherit Base):

>>> class Base(object):
...         def __init__(self, a):
...                 print 'super chain terminated'
...
>>> class D(Base):
...         def __init__(self, a):
...                 print 'do stuff with', a
...                 super(D, self).__init__(a)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
</head>
<body>
[tox]
envlist = py34
skipsdist = true
[testenv]
deps =
pytest
commands =
{posargs:py.test -vv}
[pytest]
class CaptureOutput(object):
def __init__(self, *what):
self.__names = set(what)
self.__objects = {}
for name in self.__names:
assert isinstance(name, str)
assert name in ('stderr', 'stdout', '__stderr__', '__stdout__')
def __enter__(self):
for name in self.__names:
@ionelmc
ionelmc / output.txt
Last active August 29, 2015 14:02
cmd.exe futzing
C:\Users\ionel_000>chcp 65001
Active code page: 65001
C:\Users\ionel_000>py -3
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
(None, None)
>>> locale.getlocale(locale.LC_ALL)