This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py | |
index 2ca5f80..6aa79df 100644 | |
--- a/Lib/distutils/cygwinccompiler.py | |
+++ b/Lib/distutils/cygwinccompiler.py | |
@@ -60,6 +60,7 @@ def get_msvcr(): | |
"""Include the appropriate MSVC runtime library if Python was built | |
with MSVC 7.0 or later. | |
""" | |
+ return [] # don't link with msvcr90 when using mingw64 | |
msc_pos = sys.version.find('MSC v.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gevent import spawn, event, sleep | |
count = 0 | |
ev = event.Event() | |
def doit(): | |
global count | |
ev.wait() | |
count += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
pip install --user -r /dev/stdin <<EOF | |
hg+http://bitbucket.org/agr/rope#egg=rope | |
hg+http://bitbucket.org/agr/ropemode#egg=ropemode | |
hg+http://bitbucket.org/agr/ropemacs#egg=ropemacs | |
pysmell | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(autoload 'ac-ropemacs-setup "auto-complete-python" "setup autocomplete with ropemacs" t) | |
(ac-ropemacs-require) | |
(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources)) | |
(ropemacs-mode 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Allows to test twisted applications with pytest. | |
Last modified: 2010-12-27 18:15:20 by ralf | |
Notes: twisted's asynchronous behavior may have influence on the order of test-functions | |
TODO: | |
+ credits to Ralf Schmitt See: http://twistedmatrix.com/pipermail/twisted-python/2007-February/014872.html | |
+ get test to work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def AliasModule(modname, modpath): | |
getmod = lambda: importobj(modpath, None) # do we need caching?? | |
class AliasModule(ModuleType): | |
def __repr__(self): | |
return '<AliasModule %r for %r>' % (modname, modpath) | |
def __getattribute__(self, name): | |
return getattr(getmod(), name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from gevent import monkey | |
# comment out the following line to make it work | |
monkey.patch_all() | |
import os, signal | |
from gevent import socket, core, event, Timeout, hub | |
pid2status = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apipkg.py b/apipkg.py | |
--- a/apipkg.py | |
+++ b/apipkg.py | |
@@ -30,7 +30,11 @@ | |
def importobj(modpath, attrname): | |
module = __import__(modpath, None, None, ['__doc__']) | |
- return getattr(module, attrname) | |
+ attrs = attrname.split(".") | |
+ tmp = module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import gevent.monkey; gevent.monkey.patch_all() | |
import gevent, fcntl, os | |
def doit(): | |
count = 0 | |
while 1: | |
count += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from gevent import tlmonkey, spawn, sleep, tpool | |
tlmonkey.patch_all() | |
def loop(): | |
while 1: | |
print "hello" | |
sleep(5) |