You can go to parent directory of root_dir by using .. in os.path.abspath(). import os parent_dir = os.path.abspath(os.path.join(root_dir, "..")) Now you have parent_directory of root_dir in parent_dir, You can make it root_dir and use os.walk(root_dir) again....
Your best bet is to create a wrapper around it: Rx.Observable.fromWalk = function(root, options, scheduler) { scheduler = scheduler || Rx.Scheduler.currentThread; return Rx.Observable.create(function(observer) { var walker = walk.walk(root, options); function fileHandler(x) { observer.onNext({stats : x.stats, root : x.root}); scheduler.scheduleWithState(x, function(s, i) { i.next(); }); } var files = Rx.Observable.fromEvent(walker, 'file',...