Skip to content

Run multiple scripts in same environment #45

@amlwwalker

Description

@amlwwalker

A bit like Jupyter notebooks, I want to run cells of code against the same context

in my case I have a variable in Go, a = 2 and i run this.
Then later I want to do b = a + 2 and run that from Go.
Currently doing this will result in an error a does not exist.
It seems then that all scripts must be run from top to bottom and include everything.
Is there a way to share the context in which previous python has been run?
I thought that the EmbeddedPython object would hold its state but apparently not?
Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions