Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gf shell not being able to access globals inside user defined functions. #437

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions host/greatfet/commands/greatfet_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ def main():
singleton_text = "singleton " if args.singleton else ""
print("A GreatFET {}object has been created for you as 'gf'. Have fun!\n".format(singleton_text))

# Mute annoying venv warning.
config = IPython.terminal.ipapp.load_default_config()
config.InteractiveShell.warn_venv = False

# Create a new shell, and give it access to our created GreatFET object.
if IPython.core.getipython.get_ipython() is None:
shell = IPython.terminal.embed.InteractiveShellEmbed.instance()
shell = IPython.terminal.interactiveshell.TerminalInteractiveShell.instance(config=config)
else:
shell = IPython.terminal.embed.InteractiveShellEmbed()
shell = IPython.terminal.interactiveshell.TerminalInteractiveShell(config=config)
shell.push('gf')

# Create nice aliases for our primary interfaces.
Expand Down
4 changes: 2 additions & 2 deletions host/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ dependencies = [
"future",
"pyfwup>=0.2",
"tqdm",
"setuptools", # cmsis_svd requires pkg_resources
"setuptools", # cmsis_svd requires pkg_resources
"cmsis_svd",
"tabulate",
"prompt_toolkit",
"pygreat",
"ipython~=8.25",
"ipython~=8.12", # final version supported by Python 3.8
]

dynamic = ["version"]
Expand Down