Difference between revisions of "Dynamo console"

From Dynamo
Jump to navigation Jump to search
Line 28: Line 28:
 
</tt>
 
</tt>
  
[[File:dynamo_console.png|thumb|center|500px| Opening the ''Dynamo'' console with <tt>dynamo x</tt>]]
+
[[File:dynamo_console.png|thumb|center|600px| Opening the ''Dynamo'' console with <tt>dynamo x</tt>]]
  
 
==Command Syntax==
 
==Command Syntax==

Revision as of 11:49, 2 May 2016


The Dynamo console is a device that substitutes the Matlab command line when you are using an standalone version of Dynamo.


Activating the console

The console can be invoked in a Linux shell that has been activated to work with the standalone version.

Setting the environment

An annoying feature of the standalone version is that starting a console in a fresh shell for the first time can take long time, even minutes. This can be avoided in some systems if you choose sensible value for the environment variable MCR_CACHE_ROOT. "Sensible" can mean a local folder (instead of a remotely located file share), or a location of your file system that is particularly fast.

In any case, it is always convenient to initialize this variable, instead of letting the system choose: export MCR_CACHE_ROOT=<some location>

Starting a console session

In such a shell, you can write to the linux prompt:

dynamo x

and after some more or less long waiting (see above), you will get a console with the prompt:

Dynamo >>

Opening the Dynamo console with dynamo x

Command Syntax

This console has almost the same syntax as the Dynamo matlab commands. Most usual commands can be passed without special adaption, for instance the commands that we input in the Matlab prompt as:

>> dtplot myFile.tbl;

reads in the Dynamo console as:

Dynamo >> dtplot myFile.tbl;

Commands that are not registered in the standalone can still be used in the console preceding them with \. For instance, all commands inside packages are not registered.

I.e. the command for Matlab:

>> mbimg.show(rand(64,64));

can be passed to the console through:

Dynamo >> \mbimg.show(rand(64,64));

Special commands

To leave a console type exit. Bear in mind that will loose all variables stored in the workspace. Also: pressing CTRL+C in a console session will not interrupt a Dynamo process running inside the console, but it will stop the console itself (as process running inside the Linux shell!)