Walnut  

Walnut  >  Documentation  >  Nutshell and Python

Nutshell and Python

At this moment it is not possible to use the Walnut libraries from Python programs directly. This will be possible in the future, but for now you will have to use the MS Windows version of Nutshell and the MS Windows distribution of Python. Download and install Python as described on their site.

All communication with Nutshell will go through COM, so in order to use Nutshell from within a Python program, you will need to import the Win32com.client library. Then fetch the Application object with win32com.client.Dispatch("Nutshell.Application") or the Workspaces object with win32com.client.Dispatch("Nutshell.Workspaces"). From this point you will have access to all the Nutshell's COM objects, methods and properties.

Example code:

import win32com.client 
o = win32com.client.Dispatch("Nutshell.Application")
o.Visible = 1


ws = o.Workspaces.Add("Hopfield")

ws.InsertLayer(10,10)
ws.Update

University of AmsterdamUniversity of Amsterdam
Department of Psychology
Page last modified: 2008-09-29. Validate html.
Copyright © 2000-2009 NeuroMod Group. Send us Feedback!