Adding upstream version 3.0.16.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
51316093cf
commit
0014608abc
52 changed files with 7417 additions and 0 deletions
24
examples/test-cases/ptpython-in-other-thread.py
Normal file
24
examples/test-cases/ptpython-in-other-thread.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
Example of running ptpython in another thread.
|
||||
|
||||
(For testing whether it's working fine if it's not embedded in the main
|
||||
thread.)
|
||||
"""
|
||||
import threading
|
||||
|
||||
from ptpython.repl import embed
|
||||
|
||||
|
||||
def in_thread():
|
||||
embed(globals(), locals(), vi_mode=False)
|
||||
|
||||
|
||||
def main():
|
||||
th = threading.Thread(target=in_thread)
|
||||
th.start()
|
||||
th.join()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue