4

Visual Studio 2010 + Ironpython for .net4

I want to use numpy in ironpython, and they said I must use frames support. So, I should running ipy with -X:Frames or -X:FullFrames on the command line.

But, I have two questions: 1.how can i use -X:Frames or -X:FullFrames in Ironpython Interactive console?

2.If I use C# 4 to load py which contained numpy, how can I use extern parameter like -X:Frames or -X:FullFrames?

Thanks a lot.

Begtostudy
  • 1,374
  • 4
  • 13
  • 28
  • Side note: totally surprising to me that numpy requires frames support. What part of adding some numbers requires walking the stack? The only libraries I can think of that have a good reason for *requiring* frames support are ones implementing dynamic scope by walking and mutating stack frames, and similarly "if I can't inspect stack frames I literally have no way to implement this feature" kinds of libraries. Numpy should really do graceful degradation / progressive enhancement (c.f. Transcrypt's port of numpy, which is a Python without frames support.) – mtraceur Jul 03 '22 at 16:31

1 Answers1

6
  1. IronPython Tools for Visual Studio has been deprecated by Python Tools for Visual Studio (see http://pytools.codeplex.com). Using Python Tools in VS 2010: open Tools=>Options=>Python Tools=>Interpreter Options and add "-X:FullFrames" to the "Interactive Window Options" field.

  2. When you create your IronPython engine via IronPython.Hosting.Python.CreateEngine, use the overload that accepts a Dictionary. This dictionary parameter needs a FullFrames key set to true. Performance of Mass-Evaluating Expressions in IronPython will give you a good idea how to do this.

Community
  • 1
  • 1
Dave
  • 1,212
  • 12
  • 8