Repository navigation
Adding paths to the Registry
The Registry server has a directory-like structure that holds dictionaries used by Labrad.
Our most common use case is adding new paths to the Registry, so available Labrad servers can be automatically detected on each node.
- Start
ipythonand run the following:
import labrad
cxn = labrad.connect()
r = cxn.registry()
This should print out a list of available methods to run on the server. Note the directory-like structure (with commands like cd(), dir(), etc.). Running r.dir() should return a 2-tuple of arrays. The first element of the tuple is the list of available subdirectories. Each directory also has a dictionary-like structure, and the second element of the tuple displays the available dictionary keys.
- Navigate to your node by running the following:
r.cd('Nodes')
r.cd('NAME_OF_YOUR_NODE')
r.dir()
'NAME_OF_YOUR_NODE' above should be replaced with the actual name of your node. You should get the following output, `([], ['autostart', 'directories', 'extensions'])', indicating the available dictionary keys.
- Set the new path by running
r.set('directories', ['FULL_PATH_TO_YOUR_LABRAD_TOOLS_FOLDER'])
You can do r.get('directories') to check that this worked.
- Finally, to check that everything is working, run:
cxn.servers['node_' + 'NAME_OF_YOUR_NODE'].available_servers()
You should see a list of all the available servers in your labrad_tools/ folder on the new node.
- What does Labrad do?
- What do our Labrad servers do?
- Setting up the manager and first node (Windows, Ubuntu)
- Setting up a new node
- Adding paths to the Registry