.TH "globus_net_manager_python" 3 "Tue Jul 5 2022" "Version 1.7" "globus_net_manager" \" -*- nroff -*- .ad l .nh .SH NAME globus_net_manager_python \- Python Module .PP \- Net Manager Python Module\&. .SH SYNOPSIS .br .PP .SH "Detailed Description" .PP Net Manager Python Module\&. The Net Manager Python module is an example module that provides basic Python language bindings to the Network Manager callout functionality\&. To use this example, define a python module that implements the some subset of the following functions: .PP .nf def pre_listen(task_id, transport, attrs): # return list of (scope, name, value) tuples or None def post_listen(task_id, transport, local_contact, attrs): # return a tuple containing (local_contact_out, [(scope, name, value),\&.\&.\&.]) def end_listen(task_id, transport, local_contact, attrs): # return a list of (scope, name, value) tuples or None def pre_accept(task_id, transport, local_contact, attrs): # return list of (scope, name, value) tuples or None def post_accept(task_id, transport, local_contact, remote_contact, attrs): # return list of (scope, name, value) tuples or None def pre_connect(task_id, transport, remote_contact, attrs): # return a tuple containing (remote_contact_out, [(scope, name, value),\&.\&.\&.]) def post_connect(task_id, transport, local_contact, remote_contact, attrs): # return list of (scope, name, value) tuples or None def pre_close(task_id, transport, local_contact, remote_contact, attrs): # return None def post_close(task_id, transport, local_contact, remote_contact, attrs): # return None .fi .PP The \fItask_id\fP, \fItransport\fP, \fIlocal_contact\fP, and \fIremote_contact\fP parameters to these functions are all string objects\&. The \fIattrs\fP parameter to these functions are lists of 3-tuples (scope, name, value)\&. .PP To use this with the GridFTP server, add a file containing the following to the GridFTP configuration directory \fC/etc/gridftp\&.d\fP: .PP .nf $PYTHONPATH PATH xnetmgr "manager=python;pymod=MODULE_NAME;" .fi .PP Where 'PATH' is the directory containing your module and 'MODULE_NAME' is the name of the python module that you would use to import it (i\&.e\&. without the '\&.py' extension)\&. So a module '/usr/local/globus/routeman\&.py' would require .PP .nf $PYTHONPATH /usr/local/globus xnetmgr "manager=python;pymod=routeman;" .fi .PP .PP To use this with the XIO module directly, set the string options \fCmanager=python;pymod=routeman;\fP\&. You'll need to set the \fCPYTHONPATH\fP environment variable elsewhere\&. .PP To configure the network manager to use this module directly without XIO, set the 'pymod' attribute in the 'python' scope to the name of the python module to import and use\&. For example: .PP .nf globus_net_manager_attr_init( &attr, "python", "pymod", "routeman"); .fi .PP and pass this to the context functions\&. .SH "Author" .PP Generated automatically by Doxygen for globus_net_manager from the source code\&.