Advertisement
Guest User

Untitled

a guest
Apr 20th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. server_name = '192.168.168.12'
  2. conn = SMBConnection(username=username, password=password, my_name='waldi2'
  3. remote_name=server_name, domain=domain, use_ntlm_v2=True,
  4. sign_options=SMBConnection.SIGN_WHEN_SUPPORTED, is_direct_tcp=True)
  5. connected = conn.connect(server_name, 445)
  6. # obtain a list of shares:
  7. Response = conn.listShares(timeout=30) # !!!working, shows e.g.(' Share[', 20, '] =', u'JBW_in')
  8. os.path.isdir('//192.168.168.12/JBW_out/') # is False with android, True with win7 !??
  9.  
  10. shutil.copyfile('/sdcard/waldi2_0/data/stop.txt', '//192.168.168.12/JBW_in/stop.txt')
  11.  
  12. [Errno 2] No such file or directory: '//192.168.168.12/JBW_in/stop.txt'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement