connect to server question

jyoung79 at kc.rr.com jyoung79 at kc.rr.com
Tue Dec 4 09:15:30 EST 2007


Hi Martin,

Thanks very much for your help.  This works perfect!!

Jay

>> Here's the code I presently use in a Bash Shell script:
>> 
>>     /bin/mkdir -p /Volumes/A_Share
>>     /sbin/mount_afp "afp://username:password@ServerBox/A_Share"
>> "/Volumes/A_Share"
>> 
>> Can something similar be done with Python?

> You can always use os.system to do what the shell does, ie.

> os.system("/bin/mkdir -p /Volumes/A_Share")
> os.system('/sbin/mount_afp "afp://username:password@ServerBox/A_Share"
> "/Volumes/A_Share" ')

> In the case of mkdir, you could also use os.mkdir instead, or
> os.makedir if you are uncertain whether intermediate directories
> exist.

> Regards,
> Martin



More information about the Python-list mailing list