Skip to content

Instantly share code, notes, and snippets.

💭
Primarily working on www.AtomicKotlin.com

Bruce Eckel BruceEckel

💭
Primarily working on www.AtomicKotlin.com
Block or report user

Report or block BruceEckel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BruceEckel
BruceEckel / VisitDirs.py
Created Dec 2, 2014
Trying to use Python context managers and streams together, but it doesn't work
View VisitDirs.py
import os, sys
from contextlib import contextmanager
from glob import glob
@contextmanager
def visitDir(d):
os.chdir(d)
yield d
os.chdir("..")
You can’t perform that action at this time.