Python listing directories in Windows XP from Linux host -
i'm running python on linux machine , have windows xp guest running on vbox. want access shared folder on xp machine. tried following command same error.
d = os.listdir(r"\\remoteip\share") oserror: [errno 2] no such file or directory
the shared folder on xp created creating new folder in shared documents folder , i'm able ping machines.
windows sharing implemented using smb protocol. windows explorer , of linux file managers (like nautilus) make transparent user, easy common file operations on files\folders shared through smb.
however, linux (and python runs on top of it) not add abstraction default on file system level (though can mount smb share part of fs).
so, in end, access files can:
- mount share using
mount -t cifs
(man or google details) , access share python usual folder (to mind rather kludgy solution) - use library deals smb, pysmb (here relevant docs section) , file operations it's help.
hope help.
Comments
Post a Comment