You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works with the standard python REPL, when calling ptpython by itself but not when we use ptpython.replembed() in our scripts.
from ptpython.repl import embed
embed(globals(), locals())
Then in the REPL:
>>> y=True
>>> [y for x in 'abc']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <listcomp>
NameError: name 'y' is not defined
name 'y' is not defined
From the normal ptpython or the standard REPL:
$ ptpython
>>> y=True
>>> [y for x in 'abc']
[True, True, True]
This is a workaround for
prompt-toolkit/ptpython#279, which was making
it impossible to run the installer test interactively:
>>> start_all()
…
>>> test_script()
…
machine # [ 382.137683] reboot: Power down
(7.06 seconds)
(8.23 seconds)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nix/store/lbn2xnibdcvpgkpbrkdh2vlf1ap6930v-nixos-test-driver/bin/.nixos-test-driver-wrapped", line 888, in test_script
exec(os.environ["testScript"])
File "<string>", line 69, in <module>
File "<string>", line 18, in create_machine_named
NameError: name 'default_flags' is not defined
name 'default_flags' is not defined
There’s no reason to expose the local variables of the run_tests
function, anyway.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This works with the standard python REPL, when calling ptpython by itself but not when we use ptpython.replembed() in our scripts.
Then in the REPL:
From the normal ptpython or the standard REPL:
This is a similar issue as ipython/ipython#136
The text was updated successfully, but these errors were encountered: