<s> from datetime import datetime <EOL> from rx . observable import Observable <EOL> from rx . anonymousobservable import AnonymousObservable <EOL> from rx . disposables import CompositeDisposable <EOL> from rx . internal import extensionmethod <EOL> @ extensionmethod ( Observable ) <EOL> def skip_until_with_time ( self , start_time , scheduler ) : <EOL> """<STR_LIT>""" <EOL> scheduler = scheduler or timeout_scheduler <EOL> source = self <EOL> if isinstance ( start_time , datetime ) : <EOL> scheduler_method = '<STR_LIT>' <EOL> else : <EOL> scheduler_method = '<STR_LIT>' <EOL> def subscribe ( observer ) : <EOL> open = [ False ] <EOL> def on_next ( x ) : <EOL> if open [ <NUM_LIT:0> ] : <EOL> observer . on_next ( x ) <EOL> subscription = source . subscribe ( on_next , observer . on_error , <EOL> observer . on_completed ) <EOL> def action ( scheduler , state ) : <EOL> open [ <NUM_LIT:0> ] = True <EOL> disposable = getattr ( scheduler , scheduler_method ) ( start_time , action ) <EOL> return CompositeDisposable ( disposable , subscription ) <EOL> return AnonymousObservable ( subscribe ) </s>
