Skip to content

RunSimpleString variarible not visible in Eval #474

Closed

Description

@grig27

Environment

  • Pythonnet version: 2.3.0.0
  • Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
  • Operating System: Windows 7

Details

How to use Eval() variarible after RunSimpleString()

Details

PythonEngine initialize very good.

After PythonEngine.RunSimpleString("a=1") code PythonEngine.RunSimpleString("print(a)") printing char "1".
On PythonEngine.Eval this command run this exception "name "a" is not defined".

Activity

  1. den-run-ai commented on May 26, 2017

    @den-run-ai
    Contributor
  2. den-run-ai commented on May 27, 2017

    @den-run-ai
    Contributor

    Here is how eval supposed to be used with local variables:

    public void TestEval()

    I'm going to keep this issue open, so that the corresponding docs can be added.

  3. filmor commented on Jul 11, 2017

    @filmor
    Member

    Since RunSimpleString is obsolete now and PyScope provides a much nicer interface, I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions