"This is a simple test program that demonstrates the use of the VA Python binding within a jupyter notebook environment.\n",
"Before we start scripting, let's make VA available for us. If it is not available system (or user) wide, this is how you can add the `va` module from the distribution folder structure."
"Now lets add this folder to VA. This means that VA can find files that reside in this location. We first have to import va, though:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"va.add_search_path( current_working_dir )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ok. Now let's try to connect to a VA server running on the local machine. Remark: this local machine will be the one where this server jupyter notebook is running, not necessarily your PC."
"\u001b[1;32m<ipython-input-1-316881027ede>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mva\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconnect\u001b[0m\u001b[1;33m(\u001b[0m \u001b[1;34m\"localhost\"\u001b[0m \u001b[1;33m)\u001b[0m \u001b[1;31m# default port is: 12340; can be given as second parameter\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'va' is not defined"
]
}
],
"source": [
"va.connect( \"localhost\" ) # default port is: 12340; can be given as second parameter"