os.environ['PYTHONBREAKPOINT'] = 'foo.bar.baz' breakpoint() # Imports foo.bar and calls foo.bar.baz()