[Pythonmac-SIG] Macintosh Appletalk connections?

Erik van Blokland erik@letterror.com
Thu, 30 Mar 2000 19:18:35 +0200


--Emailer_-1255980939
Content-Type: text/plain; charset="US-ASCII"

-- Schollnick, Benjamin [3/30/00 5:28 PM]:

>If anyone has any suggestions or work arounds, please feel free to let me
>know.
>
>The problem is simple, I need to retrieve files off a NT Server, using
>Python
>on the Mac.

The following works on my freshly installed OS9, and I can mount remote 
volumes with it. It uses the "Standard Additions" in the scripting 
additions folder in the system folder, but I don't know since which sys 
version these Standard Additions were present. It's not present in 8.0.
I tested it opening a volume on a regular Mac server, also OS9. I don't 
know whether it would talk to NT, if your NT machine shows up in the 
Chooser it will probably work.

YMMV, but I hope it helps.
best,
erik



#made with the AECaptureParser


import aetools
import aetypes
class eventtalker(aetools.TalkTo):
	pass

def mountservervolume(volume, server, username, password):
	talker = eventtalker("MACS")
	_arguments = {}
	_attributes = {}
	_arguments["PASS"] = password
	_arguments["USER"] = username
	_arguments["SRVR"] = server
	_arguments['----'] = volume
	_reply, _arguments, _attributes = talker.send("aevt", "mvol", 
_arguments, _attributes)
	if _arguments.has_key('errn'):
		raise aetools.Error, aetools.decodeerror(_arguments)
	if _arguments.has_key('----'):
		return _arguments['----']

mountservervolume('Robot', 'Robot CE', 'erik', '1234')



--Emailer_-1255980939
Content-Type: application/mac-binhex40; name="mountvolume.py.hqx"


(This file must be converted with BinHex 4.0)
:$Qe[G@jdGQpXG@eP,R"j!&4&@&43D@4P!3!!!!*H!!!#!jqq$@PYF'pbG#"KCA4
[Efac$@PYF'pbG#"KCA4jF'9c$@0XBA0c)'9fC@jdG'&XDf9b+'&PG'p[E(-Z9'&
XDe4[+6S0#A"KFh-0$@4PCL"YEh9ZG(0PFRCPFRC[E(9YC5KfEfaeE@8X)(0PFRC
PFL`JGA0PFQjKE@8X)("KFh0hEh*N+6S0#A4KE'YPFL!p)'9fC@jdG'&XDf9b+#*
03806)LN0#9pKFQGeE@9ZG(-J25"lI3d*Af&dG(*TBR9d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