[AG-TECH] OSX Node Services

Risto Treksler risto at elkhornbanff.ca
Mon Dec 6 16:40:55 CST 2004



Hi all,


The AudioService is a sort of a proof of concept using the VRVS rat
It works although it does not honour the Service Settings
eg. talk on by default

OTOH, The VPConsumerService should work as expected

http://irstudio.ucalgary.ca/download/OSX/AudioService.zip
http://irstudio.ucalgary.ca/download/OSX/VPConsumerService.zip

to install, place these in:
/Applications/AccessGridToolkit.app/Contents/Resources/NodeServices/



**Note**:
There's a small bug in AG where
NodeServices with more than one directory level in the zipfile 
don't extract properly

Here's a patch that should go into AG, 
if it hasn't already been fixed in CVS
http://irstudio.ucalgary.ca/download/OSX/Types.patch


To make current installations work, just patch the file: 
/Applications/AccessGridToolkit.app/Contents/Resources/lib/python2.3/site-packages/AccessGrid/Types.py

or manually replace these lines:
                    # create subdir if needed
                    pathparts = string.split(filename, '/')
                    if len(pathparts) == 2:
                        temp_dir = os.path.join(path, pathparts[0])
                        if not os.access(temp_dir, os.F_OK):
                            os.mkdir(temp_dir)
                    destfilename = os.path.join(path,filename)
                    # Extract the file
                    filecontent = zf.read( filename )
                    f = open( destfilename, "wb" )
                    f.write( filecontent )
                    f.close()

with these lines:
                    # create subdir if needed
                    destfilename = os.path.join(path,filename)
                    if filename.endswith('/'):
                        if not os.access(destfilename, os.F_OK):
                            os.mkdir(destfilename)
                    else:
                        # Extract the file
                        filecontent = zf.read( filename )
                        f = open( destfilename, "wb" )
                        f.write( filecontent )
                        f.close()




More information about the ag-tech mailing list