X Tutup
Skip to content

Commit c6ce270

Browse files
committed
Import main from bpython.{cli,gtk_} when the modules are executed directly.
Otherwise, "import bpython.cli" will be another module and you can't access e.g. "bpython.cli.stdscr" (for testing purposes only, of course).
1 parent 973e82a commit c6ce270

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

bpython/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,7 @@ def main(args=None, locals_=None, banner=None):
16101610

16111611

16121612
if __name__ == '__main__':
1613+
from bpython.cli import main
16131614
main()
16141615

16151616
# vim: sw=4 ts=4 sts=4 ai et

bpython/gtk_.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,4 +695,5 @@ def main(args=None):
695695

696696

697697
if __name__ == '__main__':
698+
from bpython.gtk_ import main
698699
main()

0 commit comments

Comments
 (0)
X Tutup